Module dlangui.graphics.resources
This module contains resource management and drawables implementation.
imageCache
is RAM cache of decoded images (as DrawBuf).
drawableCache
is cache of Drawables.
Supports nine-patch PNG images in .9.png files (like in Android).
Supports state drawables using XML files similar to ones in Android.
Synopsis
import dlangui.graphics.resources;
Functions
Name | Description |
---|---|
attrValue
|
|
attrValue
|
|
createColorDrawable
|
decode solid color / gradient / frame drawable from string like #AARRGGBB, e.g. #5599AA |
decodeDimension
|
decode size string, e.g. 1px or 2 or 3pt |
drawableCache
|
drawable cache singleton
|
extractStateFlag
|
|
extractStateFlags
|
converts XML attribute name to State (see http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList) |
imageCache
|
image cache singleton
|
Classes
Name | Description |
---|---|
Drawable
|
|
DrawableCache
|
|
EmptyDrawable
|
|
FrameDrawable
|
solid borders (may be of different width ) and, optionally, solid inner area
|
ImageCache
|
decoded raster images cache (png, jpeg) -- access by filenames |
ImageDrawable
|
|
SolidFillDrawable
|
|
StateDrawable
|
Drawable which is drawn depending on state (see http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList)
|
Global variables
Name | Type | Description |
---|---|---|
_drawableCache
|
DrawableCache
|
|
_imageCache
|
ImageCache
|
Aliases
Name | Type | Description |
---|---|---|
DrawableRef
|
Authors
Vadim Lopatin, coolreader.org@gmail.com
Copyright
Vadim Lopatin, 2014
License
Boost License 1.0