Class Win32ColorDrawBuf
Win32 context ARGB drawing buffer
Inherits from
-
(base class)ColorDrawBufBase
Constructors
Name | Description |
---|---|
this
|
|
this
|
create resized copy of ColorDrawBuf |
Fields
Name | Type | Description |
---|---|---|
_dx
|
int |
|
_dy
|
int |
|
_alpha
|
uint |
|
_clipRect
|
Rect |
|
_ninePatch
|
NinePatch* |
|
_onDestroyCallback
|
void function(uint) |
|
_refCount
|
int |
count of references to this object from Ref
|
Properties
Name | Type | Description |
---|---|---|
bmp
[get]
|
void* |
returns handle of win32 bitmap |
dc
[get]
|
void* |
returns handle of win32 device context |
alpha
[set]
|
uint |
set new alpha setting (to be applied to all drawing operations)
|
alpha
[get]
|
uint |
get current alpha setting (to be applied to all drawing operations)
|
bpp
[get]
|
int |
returns buffer bits per pixel |
clipRect
[set]
|
ref const(Rect) |
returns clipping rectangle, or (0,0,dx,dy) when no clipping. |
clipRect
[get]
|
Rect |
returns clipping rectangle, when clipRect.isEmpty == true -- means no clipping. |
hasNinePatch
[get]
|
bool |
check whether there is nine-patch information available for drawing buffer |
height
[get]
|
int |
returns current height
|
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 |
width
[get]
|
int |
returns current width
|
Methods
Name | Description |
---|---|
clear
|
Clear buffer contents, set dimension to 0, 0 |
createTransparencyBitmap
|
returns HBITMAP for alpha
|
destroyLeavingBitmap
|
destroy object, but leave bitmap as is |
drawTo
|
draw to win32 device context |
fill
|
fill with solid color
|
invertAlpha
|
invert alpha in buffer content
|
resize
|
Change buffer size |
scanLine
|
Returns pointer to scan line |
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; if clippinup applied to first rectangle, reduce second rectangle bounds proportionally.
|
applyClipping
|
apply clipRect and buffer bounds clipping to rectangle
|
beforeDrawing
|
reserved for hardware-accelerated drawing - begins drawing batch |
detectNinePatch
|
detect nine patch using image 1-pixel border (see Android documentation) |
drawFocusRect
|
draw focus rectangle; vertical gradient supported - colors [0] is top color, colors [1] is bottom color
|
drawFragment
|
draw source buffer rectangle contents to destination buffer |
drawFrame
|
draws rectangle frame of specified color and widths (per side), and optinally fills inner area |
drawGlyph
|
draw 8bit alpha image - usually font glyph using specified color (clipping is applied)
|
drawImage
|
draw unscaled image at specified coordinates |
drawRescaled
|
draw source buffer rectangle contents to destination buffer rectangle applying rescaling |
fillRect
|
fill rectangle with solid color (clipping is applied)
|
isBlackPixel
|
|
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