- afterDrawing
void afterDrawing()
reserved for hardware-accelerated drawing - ends drawing queue
- beforeDrawing
void beforeDrawing()
reserved for hardware-accelerated drawing - begins drawing queue
- clear
void clear()
- drawCustomOpenGLScene
void drawCustomOpenGLScene(Rect rc, OpenGLDrawableDelegate handler)
- drawFragment
void drawFragment(int x, int y, DrawBuf src, Rect srcrect)
draw source buffer rectangle contents to destination buffer
- drawGlyph
void drawGlyph(int x, int y, Glyph* glyph, uint color)
draw 8bit alpha image - usually font glyph using specified color (clipping is applied)
- drawLine
void drawLine(Point p1, Point p2, uint colour)
draw line from point p1 to p2 with specified color
- drawPixel
void drawPixel(int x, int y, uint color)
draw pixel at (x, y) with specified color
- drawRescaled
void drawRescaled(Rect dstrect, DrawBuf src, Rect srcrect)
draw source buffer rectangle contents to destination buffer rectangle applying rescaling
- fill
void fill(uint color)
fill the whole buffer with solid color (no clipping applied)
- fillGradientRect
void fillGradientRect(Rect rc, uint color1, uint color2, uint color3, uint color4)
fill rectangle with a gradient (clipping is applied)
- fillRect
void fillRect(Rect rc, uint color)
fill rectangle with solid color (clipping is applied)
- fillRectPattern
void fillRectPattern(Rect rc, uint color, int pattern)
fill rectangle with solid color and pattern (clipping is applied) 0=solid fill, 1 = dotted
- fillTriangleFClipped
void fillTriangleFClipped(PointF p1, PointF p2, PointF p3, uint colour)
draw filled triangle in float coordinates; clipping is already applied
- resize
void resize(int width, int height)
- restoreConfiguration
void restoreConfiguration()
Undocumented in source. Be warned that the author may not have intended to support it.
- saveConfiguration
void saveConfiguration()
Undocumented in source. Be warned that the author may not have intended to support it.
- _clipRect
Rect _clipRect;
Undocumented in source.
- _ninePatch
NinePatch* _ninePatch;
Undocumented in source.
- _alpha
uint _alpha;
Undocumented in source.
- alpha
uint alpha [@property getter]
get current alpha setting (to be applied to all drawing operations)
- alpha
uint alpha [@property setter]
set new alpha setting (to be applied to all drawing operations)
- addAlpha
void addAlpha(uint alpha)
apply additional transparency to current drawbuf alpha value
- applyAlpha
uint applyAlpha(uint argb)
applies current drawbuf alpha to argb color value
- _id
uint _id;
Undocumented in source.
- id
uint id [@property getter]
unique ID of drawbug instance, for using with hardware accelerated rendering for caching
- instanceCount
int instanceCount [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- ~this
~this()
Undocumented in source.
- _onDestroyCallback
void function(uint) _onDestroyCallback;
Undocumented in source.
- onDestroyCallback
void function(uint) onDestroyCallback [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
- onDestroyCallback
void function(uint) onDestroyCallback [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- invalidate
void invalidate()
Call to remove this image from OpenGL cache when image is updated.
- ninePatch
const(NinePatch)* ninePatch [@property getter]
get nine patch information pointer, null if this is not a nine patch image buffer
- ninePatch
NinePatch* ninePatch [@property setter]
set nine patch information pointer, null if this is not a nine patch image buffer
- hasNinePatch
bool hasNinePatch [@property getter]
check whether there is nine-patch information available for drawing buffer
- detectNinePatch
bool detectNinePatch()
override to detect nine patch using image 1-pixel border; returns true if 9-patch markup is found in image.
- width
int width [@property getter]
- height
int height [@property getter]
- resetClipping
void resetClipping()
init clip rectangle to full buffer size
- hasClipping
bool hasClipping [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- clipRect
Rect clipRect [@property getter]
returns clipping rectangle, when clipRect.isEmpty == true -- means no clipping.
- clipRect
Rect clipRect [@property setter]
returns clipping rectangle, or (0,0,dx,dy) when no clipping.
sets new clipping rectangle, when clipRect.isEmpty == true -- means no clipping.
- intersectClipRect
Rect intersectClipRect [@property setter]
sets new clipping rectangle, intersect with previous one.
- isClippedOut
Rect isClippedOut [@property setter]
returns true if rectangle is completely clipped out and cannot be drawn.
- applyClipping
bool applyClipping(Rect rc)
apply clipRect and buffer bounds clipping to rectangle
- applyClipping
bool applyClipping(Rect rc, Rect rc2)
apply clipRect and buffer bounds clipping to rectangle; if clippinup applied to first rectangle, reduce second rectangle bounds proportionally.
- beforeDrawing
void beforeDrawing()
reserved for hardware-accelerated drawing - begins drawing batch
- afterDrawing
void afterDrawing()
reserved for hardware-accelerated drawing - ends drawing batch
- bpp
int bpp [@property getter]
returns buffer bits per pixel
- resize
void resize(int width, int height)
- fill
void fill(uint color)
fill the whole buffer with solid color (no clipping applied)
- fillRect
void fillRect(Rect rc, uint color)
fill rectangle with solid color (clipping is applied)
- fillGradientRect
void fillGradientRect(Rect rc, uint color1, uint color2, uint color3, uint color4)
fill rectangle with a gradient (clipping is applied)
- fillRectPattern
void fillRectPattern(Rect rc, uint color, int pattern)
fill rectangle with solid color and pattern (clipping is applied) 0=solid fill, 1 = dotted
- drawPixel
void drawPixel(int x, int y, uint color)
draw pixel at (x, y) with specified color
- drawGlyph
void drawGlyph(int x, int y, Glyph* glyph, uint color)
draw 8bit alpha image - usually font glyph using specified color (clipping is applied)
- drawFragment
void drawFragment(int x, int y, DrawBuf src, Rect srcrect)
draw source buffer rectangle contents to destination buffer
- drawRescaled
void drawRescaled(Rect dstrect, DrawBuf src, Rect srcrect)
draw source buffer rectangle contents to destination buffer rectangle applying rescaling
- drawImage
void drawImage(int x, int y, DrawBuf src)
draw unscaled image at specified coordinates
- drawFrame
void drawFrame(Rect rc, uint frameColor, Rect frameSideWidths, uint innerAreaColor)
draws rectangle frame of specified color and widths (per side), and optinally fills inner area
- drawFocusRect
void drawFocusRect(Rect rc, uint[] colors)
draw focus rectangle; vertical gradient supported - colors[0] is top color, colors[1] is bottom color
- fillTriangleFClipped
void fillTriangleFClipped(PointF p1, PointF p2, PointF p3, uint colour)
draw filled triangle in float coordinates; clipping is already applied
- intersectClipF
bool intersectClipF(PointF p1, PointF p2, bool p1moved, bool p2moved)
find intersection of line p1..p2 with clip rectangle
- fillTriangleF
void fillTriangleF(PointF p1, PointF p2, PointF p3, uint colour)
draw filled triangle in float coordinates
- fillQuadF
void fillQuadF(PointF p1, PointF p2, PointF p3, PointF p4, uint colour)
draw filled quad in float coordinates
- drawLineF
void drawLineF(PointF p1, PointF p2, float width, uint colour)
draw line of arbitrary width in float coordinates
- intersectVectors
PointF intersectVectors(PointF p1, PointF dir1, PointF p2, PointF dir2)
Undocumented in source. Be warned that the author may not have intended to support it.
- calcLineSegmentQuad
void calcLineSegmentQuad(PointF p0, PointF p1, PointF p2, PointF p3, float width, PointF[4] quad)
Undocumented in source. Be warned that the author may not have intended to support it.
- drawLineSegmentF
void drawLineSegmentF(PointF p0, PointF p1, PointF p2, PointF p3, float width, uint colour)
draw line of arbitrary width in float coordinates p1..p2 with angle based on previous (p0..p1) and next (p2..p3) segments
- polyLineF
void polyLineF(PointF[] points, float width, uint colour, bool cycled, uint innerAreaColour)
draw poly line of arbitrary width in float coordinates; when cycled is true, connect first and last point (optionally fill inner area)
- fillPolyF
void fillPolyF(PointF[] points, uint colour)
draw filled polyline (vertexes must be in clockwise order)
- drawEllipseF
void drawEllipseF(float centerX, float centerY, float xRadius, float yRadius, float lineWidth, uint lineColor, uint fillColor)
draw ellipse or filled ellipse
- drawEllipseArcF
void drawEllipseArcF(float centerX, float centerY, float xRadius, float yRadius, float startAngle, float endAngle, float lineWidth, uint lineColor, uint fillColor)
draw ellipse arc or filled ellipse arc
- polyLine
void polyLine(Point[] points, uint colour, bool cycled)
draw poly line of width == 1px; when cycled is true, connect first and last point
- drawLine
void drawLine(Point p1, Point p2, uint colour)
draw line from point p1 to p2 with specified color
- makeArcPath
PointF[] makeArcPath(PointF center, float radiusX, float radiusY, float startAngle, float endAngle)
Undocumented in source. Be warned that the author may not have intended to support it.
- calcRectRoundedCornerRadius
PointF[4] calcRectRoundedCornerRadius(vec4 corners, float w, float h, bool keepSquareXY)
Undocumented in source. Be warned that the author may not have intended to support it.
- makeRoundedRectPath
PointF[] makeRoundedRectPath(Rect rect, vec4 corners, bool keepSquareXY, size_t[] outCornerSegmentsStart)
builds outer rounded rect path
the last parameter optionally writes out indices of first segment of corners excluding top-left
- drawRoundedRectF
void drawRoundedRectF(Rect rect, vec4 corners, bool keepSquareXY, float frameWidth, uint frameColor, uint fillColor)
draws rect with rounded corners
- transformColors
DrawBuf transformColors(ColorTransform transform)
create drawbuf with copy of current buffer with changed colors (returns this if not supported)
- drawCustomOpenGLScene
void drawCustomOpenGLScene(Rect rc, OpenGLDrawableDelegate handler)
- clear
void clear()
Undocumented in source. Be warned that the author may not have intended to support it.
drawing buffer - image container which allows to perform some drawing operations