setLineAttributes, patch from Mathias Gumz
This commit is contained in:
parent
600c29b086
commit
9991ce9ff4
1 changed files with 15 additions and 1 deletions
|
@ -19,7 +19,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: GContext.hh,v 1.8 2004/01/11 12:53:46 fluxgen Exp $
|
||||
// $Id: GContext.hh,v 1.9 2004/03/22 20:56:15 fluxgen Exp $
|
||||
|
||||
#ifndef FBTK_GCONTEXT_HH
|
||||
#define FBTK_GCONTEXT_HH
|
||||
|
@ -37,6 +37,11 @@ class Font;
|
|||
/// wrapper for X GC
|
||||
class GContext {
|
||||
public:
|
||||
|
||||
typedef enum JoinStyle { JOINMITER= JoinMiter, JOINROUND= JoinRound, JOINBEVEL= JoinBevel };
|
||||
typedef enum LineStyle { LINESOLID= LineSolid, LINEONOFFDASH= LineOnOffDash, LINEDOUBLEDASH= LineDoubleDash };
|
||||
typedef enum CapStyle { CAPNOTLAST= CapNotLast, CAPBUTT= CapButt, CAPROUND= CapRound, CAPPROJECTING= CapProjecting };
|
||||
|
||||
/// for FbTk drawable
|
||||
explicit GContext(const FbTk::FbDrawable &drawable);
|
||||
/// for X drawable
|
||||
|
@ -95,6 +100,15 @@ public:
|
|||
XSetFillRule(m_display, m_gc, rule);
|
||||
}
|
||||
|
||||
inline void setLineAttributes(unsigned int width,
|
||||
int line_style,
|
||||
int cap_style,
|
||||
int join_style) {
|
||||
|
||||
XSetLineAttributes(m_display, m_gc, width, line_style, cap_style, join_style);
|
||||
}
|
||||
|
||||
|
||||
void copy(GC gc);
|
||||
void copy(const GContext &gc);
|
||||
inline GContext &operator = (const GContext ©_gc) { copy(copy_gc); return *this; }
|
||||
|
|
Loading…
Reference in a new issue