Public Types | |
typedef textColour | textColor |
Public Member Functions | |
HDC | handle () |
The Windows handle of this device context. | |
ROP2 | rop () |
The binary raster operation used for drawing operations on this DC. | |
ROP2 | rop (ROP2 r) |
The binary raster operation used for drawing operations on this DC. | |
bool | transparent () |
Whether text, brushes and pens will be transparent. | |
bool | transparent (bool b) |
Whether text, brushes and pens will be transparent. | |
Saving and Restoring DC States | |
int | save () |
Saves the current DC state to a state stack maintained by Windows. | |
void | restore (int id=-1) |
Restores a saved DC state from the state stack. | |
GDI Object Selection | |
Font | font () |
The font selected into the DC for text operations. | |
Font | font (Font f) |
The font selected into the DC for text operations. | |
Pen | pen () |
The pen selected into the DC for drawing operations. | |
Pen | pen (Pen p) |
The pen selected into the DC for drawing operations. | |
Brush | brush () |
The brush selected into the DC for filling operations. | |
Brush | brush (Brush b) |
The brush selected into the DC for filling operations. | |
deprecated void | select (Font f) |
Selects a font into the DC for text operations. | |
deprecated void | select (Pen p) |
Selects a pen into the DC for drawing operations. | |
deprecated void | select (Brush b) |
Selects a brush into the DC for filling operations. | |
Text Measurement and Output | |
RGBColour | textColour (RGBColour c) |
The colour of text output on this DC. | |
RGBColour | textColour () |
The colour of text output on this DC. | |
RGBColour | textBackground (RGBColour c) |
The background colour used for text output on this DC. | |
RGBColour | textBackground () |
The background colour used for text output on this DC. | |
TA | textAlign (TA a) |
The alignment of text output on this DC. | |
TA | textAlign () |
The alignment of text output on this DC. | |
RectDim | textExtent (cstring text) |
Gives the dimensions of the rectangle bounding text, when output with the currently selected font. | |
void | textOut (int x, int y, cstring text) |
Outputs text using the font currently selected into the DC. | |
void | textOut (Point p, cstring text) |
Outputs text using the font currently selected into the DC. | |
Graphics: Pixels | |
void | setPixel (int x, int y, RGBColour colour) |
Sets the colour value of a pixel. | |
RGBColour | getPixel (int x, int y) |
Gets the colour value of a pixel. | |
Graphics: Lines and Curves | |
AD | arcDirection () |
The direction in which arcs are drawn. | |
AD | arcDirection (AD dir) |
The direction in which arcs are drawn. | |
void | moveTo (int x, int y) |
Moves the current drawing position to the given coordinates. | |
void | moveTo (Point p) |
Moves the current drawing position to the given point. | |
void | lineTo (int x, int y) |
Draws a straight line from the current drawing position to the given coordinates, using the currently selected pen. | |
void | lineTo (Point p) |
Draws a straight line from the current drawing position to the given point, using the currently selected pen. | |
void | arc (int left, int top, int right, int bottom, int x1, int y1, int x2, int y2) |
Draws an arc of an ellipse. | |
void | arc (Rect r, Point radial1, Point radial2) |
Draws an arc of an ellipse. | |
void | lineAngleArc (int x, int y, uint radius, float startAngle, float sweepAngle) |
Draws a line segment followed by a circular arc specified by an angle. | |
void | lineAngleArc (Point centre, uint radius, float startAngle, float sweepAngle) |
Draws a line segment followed by a circular arc specified by an angle. | |
void | polyline (Point[] p...) |
Draws a continuous sequence of lines. | |
void | polylineTo (Point[] p...) |
Draws a continuous sequence of lines, starting from the current drawing position. | |
void | bezier (Point[] p...) |
Draws a Bezier curve of one or more segments. | |
void | bezier (Point start, BezierSegment[] segments...) |
Draws a Bezier curve of one or more segments. | |
void | bezierTo (Point[] p...) |
Draws a Bezier curve of one or more segments, starting from the current drawing position. | |
void | bezierTo (BezierSegment[] segments...) |
Draws a Bezier curve of one or more segments, starting from the current drawing position. | |
Graphics: Filled Shapes | |
POLYGON_FILL | polygonFillMode () |
The method used for filling polygons. | |
POLYGON_FILL | polygonFillMode (POLYGON_FILL mode) |
The method used for filling polygons. | |
void | ellipse (int left, int top, int right, int bottom) |
Draws an ellipse. | |
void | ellipse (Rect r) |
Draws an ellipse. | |
void | segment (int left, int top, int right, int bottom, int x1, int y1, int x2, int y2) |
Draws a segment (chord slice) of an ellipse. | |
void | segment (Rect r, Point radial1, Point radial2) |
Draws a segment (chord slice) of an ellipse. | |
void | sector (int left, int top, int right, int bottom, int x1, int y1, int x2, int y2) |
Draws a sector (pie slice) of an ellipse. | |
void | sector (Rect r, Point radial1, Point radial2) |
Draws a sector (pie slice) of an ellipse. | |
void | rectangle (int left, int top, int right, int bottom) |
Draws a rectangle. | |
void | rectangle (Point topLeft, Point bottomRight) |
Draws a rectangle. | |
void | rectangle (Point topLeft, RectDim dim) |
Draws a rectangle. | |
void | rectangle (Rect r) |
Draws a rectangle. | |
void | rectangle (int left, int top, int right, int bottom, Brush b) |
Fills an unoutlined rectangle using the specified brush. | |
void | rectangle (Rect r, Brush b) |
Fills an unoutlined rectangle using the specified brush. | |
void | frameRect (int left, int top, int right, int bottom, Brush b) |
Draws a one-logical-unit border around a rectangle, using the specified brush. | |
void | frameRect (Rect r, Brush b) |
Draws a one-logical-unit border around a rectangle, using the specified brush. | |
void | roundRect (int left, int top, int right, int bottom, int roundWidth, int roundHeight) |
Draws a rounded rectangle. | |
void | roundRect (Rect r, RectDim round) |
Draws a rounded rectangle. | |
void | invertRect (int left, int top, int right, int bottom) |
Inverts the colours in a rectangle. | |
void | invertRect (Point topLeft, Point bottomRight) |
Inverts the colours in a rectangle. | |
void | invertRect (Rect r) |
Inverts the colours in a rectangle. | |
void | polygon (Point[] p...) |
Draws a polygon. | |
Bitmap Transfer | |
void | bitBlt (int toLeft, int toTop, int width, int height, DC fromDC, int fromLeft, int fromTop, uint rop=SRCCOPY) |
Copies a rectangle of bitmap data from another DC to this one. | |
void | bitBlt (Rect to, DC fromDC, Point fromTopLeft, uint rop=SRCCOPY) |
Copies a rectangle of bitmap data from another DC to this one. | |
void | bitBlt (Point toTopLeft, DC fromDC, Rect from, uint rop=SRCCOPY) |
Copies a rectangle of bitmap data from another DC to this one. | |
void | bitBlt (Point toTopLeft, MemoryDC fromDC, uint rop=SRCCOPY) |
Copies the entire bitmap held on a MemoryDC to this DC. | |
void | bitBlt (Point toTopLeft, Bitmap bmp, uint rop=SRCCOPY) |
Copies an entire bitmap to this DC. | |
void | stretchBlt (int toLeft, int toTop, int toWidth, int toHeight, DC fromDC, int fromLeft, int fromTop, int fromWidth, int fromHeight, uint rop=SRCCOPY) |
Transfers a scaled copy of bitmap data from another DC into this one. | |
void | stretchBlt (Rect to, DC fromDC, Rect from, uint rop=SRCCOPY) |
Transfers a scaled copy of bitmap data from another DC into this one. | |
void | stretchBlt (Rect to, MemoryDC fromDC, uint rop=SRCCOPY) |
Transfers a scaled copy of the entire bitmap held on a MemoryDC into this DC. | |
void | stretchBlt (Rect to, Bitmap bmp, uint rop=SRCCOPY) |
Transfers a scaled copy of an entire bitmap onto this DC. | |
Coordinate System Definition and Transformation | |
MM | mappingMode () |
The coordinate mapping mode used for drawing operations on this DC. | |
MM | mappingMode (MM mode) |
The coordinate mapping mode used for drawing operations on this DC. | |
void | setScale (Rect device, Rect logical) |
Sets up a logical coordinate system. | |
void | toLogicalCoords (inout int x, inout int y) |
Transforms the given coordinates from the device coordinate system to the logical coordinate system. | |
void | toLogicalCoords (inout Point p) |
Transforms the given coordinates from the device coordinate system to the logical coordinate system. | |
void | toLogicalCoords (Point[] p) |
Transforms the given coordinates from the device coordinate system to the logical coordinate system. | |
void | toLogicalCoords (inout Rect r) |
Transforms the given coordinates from the device coordinate system to the logical coordinate system. | |
void | toLogicalCoords (Rect[] r) |
Transforms the given coordinates from the device coordinate system to the logical coordinate system. | |
void | toDeviceCoords (inout int x, inout int y) |
Transforms the given coordinates from the logical coordinate system to the device coordinate system. | |
void | toDeviceCoords (inout Point p) |
Transforms the given coordinates from the logical coordinate system to the device coordinate system. | |
void | toDeviceCoords (Point[] p) |
Transforms the given coordinates from the logical coordinate system to the device coordinate system. | |
void | toDeviceCoords (inout Rect r) |
Transforms the given coordinates from the logical coordinate system to the device coordinate system. | |
void | toDeviceCoords (Rect[] r) |
Transforms the given coordinates from the logical coordinate system to the device coordinate system. | |
Device Information | |
int | deviceCapability (DEVICE_CAP index) |
Gets the device capability information with the specified index. | |
DT | deviceType () |
The type of device. | |
RectDim | mmSize () |
The dimensions of the device's usable area millimetres. | |
RectDim | pixelSize () |
The dimensions of the device's usable area in device units. | |
Rect | area () |
A rectangle representing the device's usable area, in device units. | |
RectDim | dotsPerInch () |
The resolution in device units per inch. | |
int | bitsPerPixelPerPlane () |
The number of bits per pixel in each 'plane'. | |
int | planes () |
The number of 'planes' in the device's memory mapping. | |
int | bitsPerPixel () |
The total number of bits in memory for each pixel. | |
int | paletteSize () |
The number of entries in the device's palette. | |
int | colourResolution () |
The overall colour resolution of the device. | |
Operators | |
final override intBool | opEquals (Object o) |
final bool | opEquals (DC a) |
Protected Member Functions | |
this (HDC dc, DCState ss) | |
Protected Attributes | |
DCState | state |
DC is the abstract base class from which the device context wrapper classes are derived.
DC objects in SDWF enforce RAII, ensuring that DCs are promptly released when they go out of scope. Each DC subclass defined within SDWF has the necessary destructor to dispose of the underlying device context.
typedef textColour smjg.libs.sdwf.dc.DC.textColor |
smjg.libs.sdwf.dc.DC.this | ( | HDC | dc, | |
DCState | ss | |||
) | [protected] |
HDC smjg.libs.sdwf.dc.DC.handle | ( | ) |
The Windows handle of this device context.
int smjg.libs.sdwf.dc.DC.save | ( | ) |
Saves the current DC state to a state stack maintained by Windows.
The DC class also maintains a stack of GDI objects selected into the DC at the time, so that they are not adversely garbage-collected.
void smjg.libs.sdwf.dc.DC.restore | ( | int | id = -1 |
) |
Restores a saved DC state from the state stack.
If a state other than the most recently saved one is selected, then it is reached by popping and discarding states from the stack until the requested state is reached.
id | the negative of the number of states to pop off the stack, or an ID number returned by save. |
ROP2 smjg.libs.sdwf.dc.DC.rop | ( | ) |
ROP2 smjg.libs.sdwf.dc.DC.rop | ( | ROP2 | r | ) |
bool smjg.libs.sdwf.dc.DC.transparent | ( | ) |
Whether text, brushes and pens will be transparent.
bool smjg.libs.sdwf.dc.DC.transparent | ( | bool | b | ) |
Whether text, brushes and pens will be transparent.
Font smjg.libs.sdwf.dc.DC.font | ( | ) |
Font smjg.libs.sdwf.dc.DC.font | ( | Font | f | ) |
Pen smjg.libs.sdwf.dc.DC.pen | ( | ) |
Pen smjg.libs.sdwf.dc.DC.pen | ( | Pen | p | ) |
Brush smjg.libs.sdwf.dc.DC.brush | ( | ) |
Brush smjg.libs.sdwf.dc.DC.brush | ( | Brush | b | ) |
deprecated void smjg.libs.sdwf.dc.DC.select | ( | Font | f | ) |
Selects a font into the DC for text operations.
f | the font to select. |
deprecated void smjg.libs.sdwf.dc.DC.select | ( | Pen | p | ) |
Selects a pen into the DC for drawing operations.
p | the pen to select. |
deprecated void smjg.libs.sdwf.dc.DC.select | ( | Brush | b | ) |
Selects a brush into the DC for filling operations.
b | the brush to select. |
RGBColour smjg.libs.sdwf.dc.DC.textBackground | ( | RGBColour | c | ) |
RGBColour smjg.libs.sdwf.dc.DC.textBackground | ( | ) |
TA smjg.libs.sdwf.dc.DC.textAlign | ( | TA | a | ) |
TA smjg.libs.sdwf.dc.DC.textAlign | ( | ) |
RectDim smjg.libs.sdwf.dc.DC.textExtent | ( | cstring | text | ) |
Gives the dimensions of the rectangle bounding text, when output with the currently selected font.
text | text to measure. |
void smjg.libs.sdwf.dc.DC.textOut | ( | int | x, | |
int | y, | |||
cstring | text | |||
) |
Outputs text using the font currently selected into the DC.
x | x-coordinate at which to output text. | |
y | y-coordinate at which to output text. | |
text | the text to output. |
void smjg.libs.sdwf.dc.DC.textOut | ( | Point | p, | |
cstring | text | |||
) |
Outputs text using the font currently selected into the DC.
p | point at which to output text. | |
text | the text to output. |
void smjg.libs.sdwf.dc.DC.setPixel | ( | int | x, | |
int | y, | |||
RGBColour | colour | |||
) |
RGBColour smjg.libs.sdwf.dc.DC.getPixel | ( | int | x, | |
int | y | |||
) |
AD smjg.libs.sdwf.dc.DC.arcDirection | ( | ) |
The direction in which arcs are drawn.
AD smjg.libs.sdwf.dc.DC.arcDirection | ( | AD | dir | ) |
The direction in which arcs are drawn.
void smjg.libs.sdwf.dc.DC.moveTo | ( | int | x, | |
int | y | |||
) |
Moves the current drawing position to the given coordinates.
void smjg.libs.sdwf.dc.DC.moveTo | ( | Point | p | ) |
Moves the current drawing position to the given point.
void smjg.libs.sdwf.dc.DC.lineTo | ( | int | x, | |
int | y | |||
) |
Draws a straight line from the current drawing position to the given coordinates, using the currently selected pen.
Updates the current drawing position to these coordinates.
void smjg.libs.sdwf.dc.DC.lineTo | ( | Point | p | ) |
Draws a straight line from the current drawing position to the given point, using the currently selected pen.
Updates the current drawing position to this point.
void smjg.libs.sdwf.dc.DC.arc | ( | int | left, | |
int | top, | |||
int | right, | |||
int | bottom, | |||
int | x1, | |||
int | y1, | |||
int | x2, | |||
int | y2 | |||
) |
Draws an arc of an ellipse.
left | x-coordinate of left edge of ellipse's bounding rectangle. | |
top | y-coordinate of top edge of ellipse's bounding rectangle. | |
right | x-coordinate of right edge of ellipse's bounding rectangle. | |
bottom | y-coordinate of bottom edge of ellipse's bounding rectangle. | |
x1 | x-coordinate of endpoint of first radial line bounding the arc. | |
y1 | y-coordinate of endpoint of first radial line bounding the arc. | |
x2 | x-coordinate of endpoint of second radial line bounding the arc. | |
y2 | y-coordinate of endpoint of second radial line bounding the arc. |
void smjg.libs.sdwf.dc.DC.arc | ( | Rect | r, | |
Point | radial1, | |||
Point | radial2 | |||
) |
Draws an arc of an ellipse.
r | ellipse's bounding rectangle. | |
radial1 | endpoint of first radial line bounding the arc. | |
radial2 | endpoint of second radial line bounding the arc. |
void smjg.libs.sdwf.dc.DC.lineAngleArc | ( | int | x, | |
int | y, | |||
uint | radius, | |||
float | startAngle, | |||
float | sweepAngle | |||
) |
Draws a line segment followed by a circular arc specified by an angle.
The line segment is drawn from the current drawing position to the beginning of the arc. (Don't ask me why - eccentricity in Windows API.) The end of the arc becomes the new current drawing position.
x | x-coordinate of centre of circle of which the arc is to be drawn. | |
y | y-coordinate of centre of circle of which the arc is to be drawn. | |
radius | radius of circle of which arc is to be drawn. | |
startAngle | angle at which to start the arc, measured anti-clockwise from the x-axis. | |
sweepAngle | angle swept by the arc, measured anti-clockwise from startAngle . |
void smjg.libs.sdwf.dc.DC.lineAngleArc | ( | Point | centre, | |
uint | radius, | |||
float | startAngle, | |||
float | sweepAngle | |||
) |
Draws a line segment followed by a circular arc specified by an angle.
The line segment is drawn from the current drawing position to the beginning of the arc. (Don't ask me why - eccentricity in Windows API.) The end of the arc becomes the new current drawing position.
centre | centre of circle of which the arc is to be drawn. | |
radius | radius of circle of which the arc is to be drawn. | |
startAngle | angle at which to start the arc, measured anti-clockwise from the x-axis. | |
sweepAngle | angle swept by the arc, measured anti-clockwise from startAngle . |
void smjg.libs.sdwf.dc.DC.polyline | ( | Point[] | p... | ) |
Draws a continuous sequence of lines.
This method doesn't touch the current drawing position.
p | array of points to connect in sequential order. |
void smjg.libs.sdwf.dc.DC.polylineTo | ( | Point[] | p... | ) |
Draws a continuous sequence of lines, starting from the current drawing position.
The final point in the sequence becomes the new current drawing position.
p | array of points to connect in sequential order. |
void smjg.libs.sdwf.dc.DC.bezier | ( | Point[] | p... | ) |
Draws a Bezier curve of one or more segments.
This method doesn't touch the current drawing position.
p | array of points defining the curve. The first point is the curve's start position. Subsequent points are three for each curve segment: the first control point, the second control point and then the endpoint. |
p
must be one more than a multiple of three and must be at least 4.void smjg.libs.sdwf.dc.DC.bezier | ( | Point | start, | |
BezierSegment[] | segments... | |||
) |
Draws a Bezier curve of one or more segments.
This method doesn't touch the current drawing position.
start | the start point of the curve. | |
segments | array of curve segments. |
void smjg.libs.sdwf.dc.DC.bezierTo | ( | Point[] | p... | ) |
Draws a Bezier curve of one or more segments, starting from the current drawing position.
The endpoint of the final segment becomes the new current drawing position.
p | array of points defining the curve. Three points are required for each curve segment: the first control point, the second control point and then the endpoint. |
must
be a multiple of 3.void smjg.libs.sdwf.dc.DC.bezierTo | ( | BezierSegment[] | segments... | ) |
Draws a Bezier curve of one or more segments, starting from the current drawing position.
The endpoint of the final segment becomes the new current drawing position.
segments | array of curve segments. |
POLYGON_FILL smjg.libs.sdwf.dc.DC.polygonFillMode | ( | ) |
The method used for filling polygons.
POLYGON_FILL smjg.libs.sdwf.dc.DC.polygonFillMode | ( | POLYGON_FILL | mode | ) |
The method used for filling polygons.
void smjg.libs.sdwf.dc.DC.ellipse | ( | int | left, | |
int | top, | |||
int | right, | |||
int | bottom | |||
) |
Draws an ellipse.
The ellipse is outlined with the currently selected pen, and filled with the currently selected brush.
left | x-coordinate of left edge of ellipse's bounding rectangle. | |
top | y-coordinate of top edge of ellipse's bounding rectangle. | |
right | x-coordinate of right edge of ellipse's bounding rectangle. | |
bottom | y-coordinate of bottom edge of ellipse's bounding rectangle. |
void smjg.libs.sdwf.dc.DC.ellipse | ( | Rect | r | ) |
Draws an ellipse.
The ellipse is outlined with the currently selected pen, and filled with the currently selected brush.
r | ellipse's bounding rectangle. |
void smjg.libs.sdwf.dc.DC.segment | ( | int | left, | |
int | top, | |||
int | right, | |||
int | bottom, | |||
int | x1, | |||
int | y1, | |||
int | x2, | |||
int | y2 | |||
) |
Draws a segment (chord slice) of an ellipse.
The segment is outlined with the currently selected pen, and filled with the currently selected brush.
left | x-coordinate of left edge of ellipse's bounding rectangle. | |
top | y-coordinate of top edge of ellipse's bounding rectangle. | |
right | x-coordinate of right edge of ellipse's bounding rectangle. | |
bottom | y-coordinate of bottom edge of ellipse's bounding rectangle. | |
x1 | x-coordinate of endpoint of first radial line bounding the arc defining the segment. | |
y1 | y-coordinate of endpoint of first radial line bounding the arc defining the segment. | |
x2 | x-coordinate of endpoint of second radial line bounding the arc defining the segment. | |
y2 | y-coordinate of endpoint of second radial line bounding the arc defining the segment. |
void smjg.libs.sdwf.dc.DC.segment | ( | Rect | r, | |
Point | radial1, | |||
Point | radial2 | |||
) |
Draws a segment (chord slice) of an ellipse.
The segment is outlined with the currently selected pen, and filled with the currently selected brush.
r | ellipse's bounding rectangle. | |
radial1 | endpoint of first radial line bounding the arc defining the segment. | |
radial2 | endpoint of second radial line bounding the arc defining the segment. |
void smjg.libs.sdwf.dc.DC.sector | ( | int | left, | |
int | top, | |||
int | right, | |||
int | bottom, | |||
int | x1, | |||
int | y1, | |||
int | x2, | |||
int | y2 | |||
) |
Draws a sector (pie slice) of an ellipse.
The sector is outlined with the currently selected pen, and filled with the currently selected brush.
left | x-coordinate of left edge of ellipse's bounding rectangle. | |
top | y-coordinate of top edge of ellipse's bounding rectangle. | |
right | x-coordinate of right edge of ellipse's bounding rectangle. | |
bottom | y-coordinate of bottom edge of ellipse's bounding rectangle. | |
x1 | x-coordinate of endpoint of first radial line bounding the sector. | |
y1 | y-coordinate of endpoint of first radial line bounding the sector. | |
x2 | x-coordinate of endpoint of second radial line bounding the sector. | |
y2 | y-coordinate of endpoint of second radial line bounding the sector. |
void smjg.libs.sdwf.dc.DC.sector | ( | Rect | r, | |
Point | radial1, | |||
Point | radial2 | |||
) |
Draws a sector (pie slice) of an ellipse.
The sector is outlined with the currently selected pen, and filled with the currently selected brush.
r | ellipse's bounding rectangle. | |
radial1 | endpoint of first radial line bounding the sector. | |
radial2 | endpoint of second radial line bounding the sector. |
void smjg.libs.sdwf.dc.DC.rectangle | ( | int | left, | |
int | top, | |||
int | right, | |||
int | bottom | |||
) |
Draws a rectangle.
The rectangle is outlined with the currently selected pen, and filled with the currently selected brush.
left | x-coordinate of left edge of the rectangle. | |
top | y-coordinate of top edge of the rectangle. | |
right | x-coordinate of right edge of the rectangle. | |
bottom | y-coordinate of bottom edge of the rectangle. |
void smjg.libs.sdwf.dc.DC.rectangle | ( | Point | topLeft, | |
Point | bottomRight | |||
) |
Draws a rectangle.
The rectangle is outlined with the currently selected pen, and filled with the currently selected brush.
topLeft | top-left corner. | |
bottomRight | bottom-right corner. |
void smjg.libs.sdwf.dc.DC.rectangle | ( | Point | topLeft, | |
RectDim | dim | |||
) |
Draws a rectangle.
The rectangle is outlined with the currently selected pen, and filled with the currently selected brush.
topLeft | top-left corner. | |
dim | dimensions of rectangle. |
void smjg.libs.sdwf.dc.DC.rectangle | ( | Rect | r | ) |
Draws a rectangle.
The rectangle is outlined with the currently selected pen, and filled with the currently selected brush.
r | rectangle to draw. |
void smjg.libs.sdwf.dc.DC.rectangle | ( | int | left, | |
int | top, | |||
int | right, | |||
int | bottom, | |||
Brush | b | |||
) |
Fills an unoutlined rectangle using the specified brush.
left | x-coordinate of left edge of the rectangle. | |
top | y-coordinate of top edge of the rectangle. | |
right | x-coordinate of right edge of the rectangle. | |
bottom | y-coordinate of bottom edge of the rectangle. | |
b | brush with which to fill. |
void smjg.libs.sdwf.dc.DC.rectangle | ( | Rect | r, | |
Brush | b | |||
) |
Fills an unoutlined rectangle using the specified brush.
r | rectangle to draw. | |
b | brush with which to fill. |
void smjg.libs.sdwf.dc.DC.frameRect | ( | int | left, | |
int | top, | |||
int | right, | |||
int | bottom, | |||
Brush | b | |||
) |
Draws a one-logical-unit border around a rectangle, using the specified brush.
left | x-coordinate of left edge of the rectangle. | |
top | y-coordinate of top edge of the rectangle. | |
right | x-coordinate of right edge of the rectangle. | |
bottom | y-coordinate of bottom edge of the rectangle. | |
b | brush with which to draw the border. |
void smjg.libs.sdwf.dc.DC.frameRect | ( | Rect | r, | |
Brush | b | |||
) |
Draws a one-logical-unit border around a rectangle, using the specified brush.
r | rectangle to frame. | |
b | brush with which to draw the border. |
void smjg.libs.sdwf.dc.DC.roundRect | ( | int | left, | |
int | top, | |||
int | right, | |||
int | bottom, | |||
int | roundWidth, | |||
int | roundHeight | |||
) |
Draws a rounded rectangle.
The rounded rectangle is outlined with the currently selected pen, and filled with the currently selected brush.
left | x-coordinate of left edge of the rectangle. | |
top | y-coordinate of top edge of the rectangle. | |
right | x-coordinate of right edge of the rectangle. | |
bottom | y-coordinate of bottom edge of the rectangle. | |
roundWidth | width of rounding ellipse. | |
roundHeight | height of rounding ellipse. |
void smjg.libs.sdwf.dc.DC.roundRect | ( | Rect | r, | |
RectDim | round | |||
) |
Draws a rounded rectangle.
The rounded rectangle is outlined with the currently selected pen, and filled with the currently selected brush.
r | rectangle to draw. | |
round | dimensions of rounding ellipse. |
void smjg.libs.sdwf.dc.DC.invertRect | ( | int | left, | |
int | top, | |||
int | right, | |||
int | bottom | |||
) |
Inverts the colours in a rectangle.
left | x-coordinate of left edge of the rectangle. | |
top | y-coordinate of top edge of the rectangle. | |
right | x-coordinate of right edge of the rectangle. | |
bottom | y-coordinate of bottom edge of the rectangle. |
void smjg.libs.sdwf.dc.DC.invertRect | ( | Point | topLeft, | |
Point | bottomRight | |||
) |
Inverts the colours in a rectangle.
topLeft | top-left corner. | |
bottomRight | bottom-right corner. |
void smjg.libs.sdwf.dc.DC.invertRect | ( | Rect | r | ) |
Inverts the colours in a rectangle.
r | rectangle to invert. |
void smjg.libs.sdwf.dc.DC.polygon | ( | Point[] | p... | ) |
Draws a polygon.
The polygon is outlined with the currently selected pen, and filled with the currently selected brush.
p | array of vertices of the polygon in sequential order. |
void smjg.libs.sdwf.dc.DC.bitBlt | ( | int | toLeft, | |
int | toTop, | |||
int | width, | |||
int | height, | |||
DC | fromDC, | |||
int | fromLeft, | |||
int | fromTop, | |||
uint | rop = SRCCOPY | |||
) |
Copies a rectangle of bitmap data from another DC to this one.
toLeft | x-coordinate of the left edge of the destination rectangle on this DC. | |
toTop | y-coordinate of the top edge of the destination rectangle on this DC. | |
width | width of the rectangle to transfer. | |
height | height of the rectangle to transfer. | |
fromDC | DC from which data is to be transferred. | |
fromLeft | x-coordinate of the left edge of the source rectangle on fromDC . | |
fromTop | y-coordinate of the top edge of the source rectangle on fromDC . | |
rop | raster operation value, as defined in the Windows API. |
void smjg.libs.sdwf.dc.DC.bitBlt | ( | Rect | to, | |
DC | fromDC, | |||
Point | fromTopLeft, | |||
uint | rop = SRCCOPY | |||
) |
void smjg.libs.sdwf.dc.DC.bitBlt | ( | Point | toTopLeft, | |
DC | fromDC, | |||
Rect | from, | |||
uint | rop = SRCCOPY | |||
) |
void smjg.libs.sdwf.dc.DC.bitBlt | ( | Point | toTopLeft, | |
MemoryDC | fromDC, | |||
uint | rop = SRCCOPY | |||
) |
void smjg.libs.sdwf.dc.DC.bitBlt | ( | Point | toTopLeft, | |
Bitmap | bmp, | |||
uint | rop = SRCCOPY | |||
) |
void smjg.libs.sdwf.dc.DC.stretchBlt | ( | int | toLeft, | |
int | toTop, | |||
int | toWidth, | |||
int | toHeight, | |||
DC | fromDC, | |||
int | fromLeft, | |||
int | fromTop, | |||
int | fromWidth, | |||
int | fromHeight, | |||
uint | rop = SRCCOPY | |||
) |
Transfers a scaled copy of bitmap data from another DC into this one.
toLeft | x-coordinate of the left edge of the destination rectangle on this DC. | |
toTop | y-coordinate of the top edge of the destination rectangle on this DC. | |
toWidth | width of the destination rectangle on this DC. | |
toHeight | height of the destination rectangle on this DC. | |
fromDC | DC from which data is to be transferred. | |
fromLeft | x-coordinate of the left edge of the source rectangle on fromDC . | |
fromTop | y-coordinate of the top edge of the source rectangle on fromDC . | |
fromWidth | width of the source rectangle on fromDC . | |
fromHeight | height of the source rectangle on fromDC . | |
rop | raster operation value, as defined in the Windows API. |
void smjg.libs.sdwf.dc.DC.stretchBlt | ( | Rect | to, | |
DC | fromDC, | |||
Rect | from, | |||
uint | rop = SRCCOPY | |||
) |
void smjg.libs.sdwf.dc.DC.stretchBlt | ( | Rect | to, | |
MemoryDC | fromDC, | |||
uint | rop = SRCCOPY | |||
) |
void smjg.libs.sdwf.dc.DC.stretchBlt | ( | Rect | to, | |
Bitmap | bmp, | |||
uint | rop = SRCCOPY | |||
) |
MM smjg.libs.sdwf.dc.DC.mappingMode | ( | ) |
The coordinate mapping mode used for drawing operations on this DC.
MM smjg.libs.sdwf.dc.DC.mappingMode | ( | MM | mode | ) |
The coordinate mapping mode used for drawing operations on this DC.
void smjg.libs.sdwf.dc.DC.setScale | ( | Rect | device, | |
Rect | logical | |||
) |
Sets up a logical coordinate system.
logical
rectangle must be of non-zero area. device | a rectangle in device coordinates. To set a coordinate range to cover an entire window's client area, use Window.clientArea. | |
logical | a rectangle in logical coordinates to map to device . |
logical
will map to the largest possible rectangle with the correct proportions centred within device
. void smjg.libs.sdwf.dc.DC.toLogicalCoords | ( | inout int | x, | |
inout int | y | |||
) |
Transforms the given coordinates from the device coordinate system to the logical coordinate system.
x | the device x-coordinate, which will be replaced by the logical x-coordinate. | |
y | the device y-coordinate, which will be replaced by the logical y-coordinate. |
void smjg.libs.sdwf.dc.DC.toLogicalCoords | ( | inout Point | p | ) |
Transforms the given coordinates from the device coordinate system to the logical coordinate system.
p | point in device coordinates, which will be replaced by logical coordinates. |
void smjg.libs.sdwf.dc.DC.toLogicalCoords | ( | Point[] | p | ) |
Transforms the given coordinates from the device coordinate system to the logical coordinate system.
p | array of points in device coordinates, which will be replaced by logical coordinates. |
void smjg.libs.sdwf.dc.DC.toLogicalCoords | ( | inout Rect | r | ) |
Transforms the given coordinates from the device coordinate system to the logical coordinate system.
r | rectangle in device coordinates, which will be replaced by logical coordinates. |
void smjg.libs.sdwf.dc.DC.toLogicalCoords | ( | Rect[] | r | ) |
Transforms the given coordinates from the device coordinate system to the logical coordinate system.
r | array of rectangles in device coordinates, which will be replaced by logical coordinates. |
void smjg.libs.sdwf.dc.DC.toDeviceCoords | ( | inout int | x, | |
inout int | y | |||
) |
Transforms the given coordinates from the logical coordinate system to the device coordinate system.
x | the logical x-coordinate, which will be replaced by the device x-coordinate. | |
y | the logical y-coordinate, which will be replaced by the device y-coordinate. |
void smjg.libs.sdwf.dc.DC.toDeviceCoords | ( | inout Point | p | ) |
Transforms the given coordinates from the logical coordinate system to the device coordinate system.
p | point in logical coordinates, which will be replaced by device coordinates. |
void smjg.libs.sdwf.dc.DC.toDeviceCoords | ( | Point[] | p | ) |
Transforms the given coordinates from the logical coordinate system to the device coordinate system.
p | array of points in logical coordinates, which will be replaced by device coordinates. |
void smjg.libs.sdwf.dc.DC.toDeviceCoords | ( | inout Rect | r | ) |
Transforms the given coordinates from the logical coordinate system to the device coordinate system.
r | rectangle in logical coordinates, which will be replaced by device coordinates. |
void smjg.libs.sdwf.dc.DC.toDeviceCoords | ( | Rect[] | r | ) |
Transforms the given coordinates from the logical coordinate system to the device coordinate system.
r | array of rectangles in logical coordinates, which will be replaced by device coordinates. |
int smjg.libs.sdwf.dc.DC.deviceCapability | ( | DEVICE_CAP | index | ) |
Gets the device capability information with the specified index.
index | identifies information to query. |
DT smjg.libs.sdwf.dc.DC.deviceType | ( | ) |
The type of device.
RectDim smjg.libs.sdwf.dc.DC.mmSize | ( | ) |
The dimensions of the device's usable area millimetres.
For a PrintDC, this is the size of the printable area of the page. For a display DC, this is the size of the screen. The reported size is not related to the physical size of the screen, but to a logical millimetre determined by the system font scale.
RectDim smjg.libs.sdwf.dc.DC.pixelSize | ( | ) |
The dimensions of the device's usable area in device units.
For a PrintDC, this is the size of the printable area of the page. For a display DC, this is the size of the screen.
Rect smjg.libs.sdwf.dc.DC.area | ( | ) |
A rectangle representing the device's usable area, in device units.
For a PrintDC, this is the size of the printable area of the page. For a display DC, this is the size of the screen.
RectDim smjg.libs.sdwf.dc.DC.dotsPerInch | ( | ) |
The resolution in device units per inch.
For a display DC, the reported resolution is not related to the physical size of the screen, but to a logical inch determined by the system font scale.
int smjg.libs.sdwf.dc.DC.bitsPerPixelPerPlane | ( | ) |
The number of bits per pixel in each 'plane'.
int smjg.libs.sdwf.dc.DC.planes | ( | ) |
The number of 'planes' in the device's memory mapping.
Planes are disjoint regions of memory that each map to the whole device area, but influence different aspects of each pixel. For example, on some devices the red, green and blue components of a colour are separate planes.
int smjg.libs.sdwf.dc.DC.bitsPerPixel | ( | ) |
The total number of bits in memory for each pixel.
This is equal to bitsPerPixelPerPlane * planes
.
int smjg.libs.sdwf.dc.DC.paletteSize | ( | ) |
The number of entries in the device's palette.
-1
for a non-palette device.int smjg.libs.sdwf.dc.DC.colourResolution | ( | ) |
The overall colour resolution of the device.
This is the number of bits in the device's colour space, from which palette colours may be picked in the case of a palette device.
final override intBool smjg.libs.sdwf.dc.DC.opEquals | ( | Object | o | ) |
final bool smjg.libs.sdwf.dc.DC.opEquals | ( | DC | a | ) |
DCState smjg.libs.sdwf.dc.DC.state [protected] |