FXDC

class FXDC

Abstract Device Context

Inheritance:


Public Methods

[more] FXDC(FXApp* a)
Construct dummy DC
[more]FXApp* getApp() const
Get application
[more]virtual FXColor readPixel(FXint x, FXint y)
Read back pixel
[more]virtual void drawPoint(FXint x, FXint y)
Draw points
[more]virtual void drawLine(FXint x1, FXint y1, FXint x2, FXint y2)
Draw lines
[more]virtual void drawRectangle(FXint x, FXint y, FXint w, FXint h)
Draw rectangles
[more]virtual void drawArc(FXint x, FXint y, FXint w, FXint h, FXint ang1, FXint ang2)
Draw arcs.
[more]virtual void fillRectangle(FXint x, FXint y, FXint w, FXint h)
Filled rectangles
[more]virtual void fillArc(FXint x, FXint y, FXint w, FXint h, FXint ang1, FXint ang2)
Draw arcs
[more]virtual void fillPolygon(const FXPoint* points, FXuint npoints)
Filled polygon
[more]virtual void fillPolygonRel(const FXPoint* points, FXuint npoints)
Filled polygon with relative points
[more]virtual void drawHashBox(FXint x, FXint y, FXint w, FXint h, FXint b=1)
Draw hashed box
[more]virtual void drawFocusRectangle(FXint x, FXint y, FXint w, FXint h)
Draw focus rectangle
[more]virtual void drawArea(const FXDrawable* source, FXint sx, FXint sy, FXint sw, FXint sh, FXint dx, FXint dy)
Draw area from source
[more]virtual void drawImage(const FXImage* image, FXint dx, FXint dy)
Draw image
[more]virtual void drawBitmap(const FXBitmap* bitmap, FXint dx, FXint dy)
Draw bitmap
[more]virtual void drawIcon(const FXIcon* icon, FXint dx, FXint dy)
Draw icon
[more]virtual void drawText(FXint x, FXint y, const FXchar* string, FXuint length)
Draw string
[more]virtual void setForeground(FXColor clr)
Set foreground drawing color
[more]FXColor getForeground() const
Get foreground drawing color
[more]virtual void setBackground(FXColor clr)
Set background drawing color
[more]FXColor getBackground() const
Get background drawing color
[more]virtual void setDashes(FXuint dashoffset, const FXchar* dashpattern, FXuint dashlength)
Set dash pattern and dash offset.
[more]const FXchar* getDashPattern() const
Get dash pattern
[more]FXuint getDashOffset() const
Get dash offset
[more]FXuint getDashLength() const
Get dash length
[more]virtual void setLineWidth(FXuint linewidth=0)
Set line width:- 0 means thinnest/fastest possible
[more]FXuint getLineWidth() const
Get line width
[more]virtual void setLineCap(FXCapStyle capstyle=CAP_BUTT)
Set line cap style
[more]FXCapStyle getLineCap() const
Get line cap style
[more]virtual void setLineJoin(FXJoinStyle joinstyle=JOIN_MITER)
Set line join style
[more]FXJoinStyle getLineJoin() const
Get line join style
[more]virtual void setLineStyle(FXLineStyle linestyle=LINE_SOLID)
Set line style
[more]FXLineStyle getLineStyle() const
Get line style
[more]virtual void setFillStyle(FXFillStyle fillstyle=FILL_SOLID)
Set fill style
[more]FXFillStyle getFillStyle() const
Get fill style
[more]virtual void setFillRule(FXFillRule fillrule=RULE_EVEN_ODD)
Set fill rule
[more]FXFillRule getFillRule() const
Get fill rule
[more]virtual void setFunction(FXFunction func=BLT_SRC)
Set rasterop function
[more]FXFunction getFunction() const
Get rasterop function
[more]virtual void setTile(FXImage* image, FXint dx=0, FXint dy=0)
Set the tile image
[more]FXImage* getTile() const
Get the tile image
[more]virtual void setStipple(FXBitmap* bitmap, FXint dx=0, FXint dy=0)
Set the stipple pattern
[more]FXBitmap* getStippleBitmap() const
Get stipple bitmap
[more]virtual void setStipple(FXStipplePattern pat, FXint dx=0, FXint dy=0)
Set the stipple pattern
[more]FXStipplePattern getStipplePattern() const
Get pattern
[more]virtual void setClipRegion(const FXRegion& region)
Set clip region
[more]virtual void setClipRectangle(FXint x, FXint y, FXint w, FXint h)
Set clip rectangle
[more]virtual void setClipRectangle(const FXRectangle& rectangle)
Change clip rectangle
[more]const FXRectangle& getClipRectangle() const
Return clip rectangle
[more]FXint getClipX() const
Return clip x
[more]FXint getClipY() const
Return clip y
[more]FXint getClipWidth() const
Return clip width
[more]FXint getClipHeight() const
Return clip height
[more]virtual void clearClipRectangle()
Clear clipping
[more]virtual void setClipMask(FXBitmap* bitmap, FXint dx=0, FXint dy=0)
Set clip mask
[more]virtual void clearClipMask()
Clear clip mask
[more]virtual void setTextFont(FXFont* fnt)
Set font to draw text with
[more]FXFont* getTextFont() const
Get text font
[more]virtual void clipChildren(FXbool yes)
Clip against child windows
[more]virtual ~FXDC()
Destructor


Documentation

Abstract Device Context

A Device Context is used to maintain the state of the graphics drawing system. Defining your drawing code in terms of the Abstract Device Context allows the drawing commands to be rendered on different types of surfaces, such as windows and images (FXDCWindow), or on paper (FXDCPrint). WYSYWYG may be obtained by using the same identical drawing code in your application regardless of the actual device surface being utilized.

o FXDC(FXApp* a)
Construct dummy DC

oFXApp* getApp() const
Get application

ovirtual FXColor readPixel(FXint x, FXint y)
Read back pixel

ovirtual void drawPoint(FXint x, FXint y)
Draw points

ovirtual void drawLine(FXint x1, FXint y1, FXint x2, FXint y2)
Draw lines

ovirtual void drawRectangle(FXint x, FXint y, FXint w, FXint h)
Draw rectangles

ovirtual void drawArc(FXint x, FXint y, FXint w, FXint h, FXint ang1, FXint ang2)
Draw arcs. The argument ang1 specifies the start of the arc relative to the three-o'clock position from the center, in units of degrees*64. The argument ang2 specifies the path and extent of the arc relative to the start of the arc, in units of degrees*64. The arguments x,y,w,h specify the bounding rectangle.

ovirtual void fillRectangle(FXint x, FXint y, FXint w, FXint h)
Filled rectangles

ovirtual void fillArc(FXint x, FXint y, FXint w, FXint h, FXint ang1, FXint ang2)
Draw arcs

ovirtual void fillPolygon(const FXPoint* points, FXuint npoints)
Filled polygon

ovirtual void fillPolygonRel(const FXPoint* points, FXuint npoints)
Filled polygon with relative points

ovirtual void drawHashBox(FXint x, FXint y, FXint w, FXint h, FXint b=1)
Draw hashed box

ovirtual void drawFocusRectangle(FXint x, FXint y, FXint w, FXint h)
Draw focus rectangle

ovirtual void drawArea(const FXDrawable* source, FXint sx, FXint sy, FXint sw, FXint sh, FXint dx, FXint dy)
Draw area from source

ovirtual void drawImage(const FXImage* image, FXint dx, FXint dy)
Draw image

ovirtual void drawBitmap(const FXBitmap* bitmap, FXint dx, FXint dy)
Draw bitmap

ovirtual void drawIcon(const FXIcon* icon, FXint dx, FXint dy)
Draw icon

ovirtual void drawText(FXint x, FXint y, const FXchar* string, FXuint length)
Draw string

ovirtual void setForeground(FXColor clr)
Set foreground drawing color

oFXColor getForeground() const
Get foreground drawing color

ovirtual void setBackground(FXColor clr)
Set background drawing color

oFXColor getBackground() const
Get background drawing color

ovirtual void setDashes(FXuint dashoffset, const FXchar* dashpattern, FXuint dashlength)
Set dash pattern and dash offset. A dash pattern of [1 2 3 4] is a repeating pattern of 1 foreground pixel, 2 background pixels, 3 foreground pixels, and 4 background pixels. The offset is where in the pattern the system will start counting. The maximum length of the dash pattern is 32.

oconst FXchar* getDashPattern() const
Get dash pattern

oFXuint getDashOffset() const
Get dash offset

oFXuint getDashLength() const
Get dash length

ovirtual void setLineWidth(FXuint linewidth=0)
Set line width:- 0 means thinnest/fastest possible

oFXuint getLineWidth() const
Get line width

ovirtual void setLineCap(FXCapStyle capstyle=CAP_BUTT)
Set line cap style

oFXCapStyle getLineCap() const
Get line cap style

ovirtual void setLineJoin(FXJoinStyle joinstyle=JOIN_MITER)
Set line join style

oFXJoinStyle getLineJoin() const
Get line join style

ovirtual void setLineStyle(FXLineStyle linestyle=LINE_SOLID)
Set line style

oFXLineStyle getLineStyle() const
Get line style

ovirtual void setFillStyle(FXFillStyle fillstyle=FILL_SOLID)
Set fill style

oFXFillStyle getFillStyle() const
Get fill style

ovirtual void setFillRule(FXFillRule fillrule=RULE_EVEN_ODD)
Set fill rule

oFXFillRule getFillRule() const
Get fill rule

ovirtual void setFunction(FXFunction func=BLT_SRC)
Set rasterop function

oFXFunction getFunction() const
Get rasterop function

ovirtual void setTile(FXImage* image, FXint dx=0, FXint dy=0)
Set the tile image

oFXImage* getTile() const
Get the tile image

ovirtual void setStipple(FXBitmap* bitmap, FXint dx=0, FXint dy=0)
Set the stipple pattern

oFXBitmap* getStippleBitmap() const
Get stipple bitmap

ovirtual void setStipple(FXStipplePattern pat, FXint dx=0, FXint dy=0)
Set the stipple pattern

oFXStipplePattern getStipplePattern() const
Get pattern

ovirtual void setClipRegion(const FXRegion& region)
Set clip region

ovirtual void setClipRectangle(FXint x, FXint y, FXint w, FXint h)
Set clip rectangle

ovirtual void setClipRectangle(const FXRectangle& rectangle)
Change clip rectangle

oconst FXRectangle& getClipRectangle() const
Return clip rectangle

oFXint getClipX() const
Return clip x

oFXint getClipY() const
Return clip y

oFXint getClipWidth() const
Return clip width

oFXint getClipHeight() const
Return clip height

ovirtual void clearClipRectangle()
Clear clipping

ovirtual void setClipMask(FXBitmap* bitmap, FXint dx=0, FXint dy=0)
Set clip mask

ovirtual void clearClipMask()
Clear clip mask

ovirtual void setTextFont(FXFont* fnt)
Set font to draw text with

oFXFont* getTextFont() const
Get text font

ovirtual void clipChildren(FXbool yes)
Clip against child windows

ovirtual ~FXDC()
Destructor


Direct child classes:
FXDCWindow
FXDCPrint

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.