Class GrayDrawBuf
Properties
Name |
Type |
Description |
bpp
[get]
|
int |
returns buffer bits per pixel
|
height
[get]
|
int |
returns current height
|
width
[get]
|
int |
returns current width
|
alpha
[get]
|
uint |
get current alpha setting (to be applied to all drawing operations)
|
alpha
[set]
|
uint |
set new alpha setting (to be applied to all drawing operations)
|
clipRect
[get]
|
Rect |
returns clipping rectangle, when clipRect.isEmpty == true -- means no clipping.
|
clipRect
[set]
|
ref const(Rect) |
returns clipping rectangle, or (0,0,dx,dy) when no clipping.
|
hasNinePatch
[get]
|
bool |
check whether there is nine-patch information available for drawing buffer
|
intersectClipRect
[set]
|
ref const(Rect) |
sets new clipping rectangle, intersect with previous one.
|
isClippedOut
[set]
|
bool |
returns true if rectangle is completely clipped out and cannot be drawn.
|
ninePatch
[get]
|
const(NinePatch)* |
get nine patch information pointer, null if this is not a nine patch image buffer
|
ninePatch
[set]
|
NinePatch* |
set nine patch information pointer, null if this is not a nine patch image buffer
|
onDestroyCallback
[set]
|
void function(uint) |
|
onDestroyCallback
[set]
|
uint |
|
refCount
[get]
|
int |
returns current value of reference counter
|
Methods
Name |
Description |
detectNinePatch
|
detect nine patch using image 1-pixel border (see Android documentation)
|
drawFragment
|
draw source buffer rectangle contents to destination buffer
|
drawGlyph
|
draw 8bit alpha image - usually font glyph using specified color (clipping is applied)
|
drawRescaled
|
draw source buffer rectangle contents to destination buffer rectangle applying rescaling
|
fill
|
fill the whole buffer with solid color (no clipping applied)
|
fillRect
|
fill rectangle with solid color (clipping is applied)
|
resize
|
resize buffer
|
scanLine
|
|
addAlpha
|
apply additional transparency to current drawbuf alpha value
|
addRef
|
increments reference counter
|
afterDrawing
|
reserved for hardware-accelerated drawing - ends drawing batch
|
applyAlpha
|
applies current drawbuf alpha to argb color value
|
applyClipping
|
apply clipRect and buffer bounds clipping to rectangle
|
applyClipping
|
apply clipRect and buffer bounds clipping to rectangle; if clippinup applied to first rectangle, reduce second rectangle bounds proportionally.
|
beforeDrawing
|
reserved for hardware-accelerated drawing - begins drawing batch
|
clear
|
|
drawFocusRect
|
draw focus rectangle; vertical gradient supported - colors [0] is top color, colors [1] is bottom color
|
drawFrame
|
draws rectangle frame of specified color and widths (per side), and optinally fills inner area
|
drawImage
|
draw unscaled image at specified coordinates
|
releaseRef
|
decrement reference counter, destroy object if no more references left
|
resetClipping
|
init clip rectangle to full buffer size
|
transformColors
|
create drawbuf with copy of current buffer with changed colors (returns this if not supported)
|
Authors
Vadim Lopatin, coolreader.org@gmail.com
Copyright
Vadim Lopatin, 2014
License
Boost License 1.0