LibreOffice Module android (master) 1
|
Encapsulates the logic needed to draw a nine-patch bitmap using OpenGL ES. More...
Public Member Functions | |
NinePatchTileLayer (CairoImage image) | |
void | draw (RenderContext context) |
Subclasses override this function to draw the layer. More... | |
Public Member Functions inherited from org.mozilla.gecko.gfx.TileLayer | |
CairoImage | getImage () |
TileLayer (CairoImage image, PaintMode paintMode) | |
void | destroy () |
void | setPaintMode (PaintMode mode) |
void | invalidate () |
Invalidates the entire buffer so that it will be uploaded again. More... | |
Public Member Functions inherited from org.mozilla.gecko.gfx.Layer | |
Layer () | |
Layer (IntSize size) | |
final boolean | update (RenderContext context) |
Updates the layer. More... | |
abstract void | draw (RenderContext context) |
Subclasses override this function to draw the layer. More... | |
Region | getValidRegion (RenderContext context) |
Returns the region of the layer that is considered valid. More... | |
void | beginTransaction () |
Call this before modifying the layer. More... | |
void | endTransaction () |
Call this when you're done modifying the layer. More... | |
Rect | getPosition () |
Returns the current layer position. More... | |
void | setPosition (Rect newPosition) |
Sets the position. More... | |
float | getResolution () |
Returns the current layer's resolution. More... | |
void | setResolution (float newResolution) |
Sets the layer resolution. More... | |
boolean | usesDefaultProgram () |
Private Member Functions | |
void | drawPatches (RenderContext context) |
void | drawPatch (RenderContext context, int textureX, int textureY, float tileX, float tileY, float tileWidth, float tileHeight) |
Static Private Attributes | |
static final int | PATCH_SIZE = 16 |
static final int | TEXTURE_SIZE = 64 |
Additional Inherited Members | |
Protected Member Functions inherited from org.mozilla.gecko.gfx.TileLayer | |
boolean | repeats () |
boolean | stretches () |
int | getTextureID () |
boolean | initialized () |
void | finalize () throws Throwable |
void | performUpdates (RenderContext context) |
Subclasses may override this method to perform custom layer updates. More... | |
Protected Member Functions inherited from org.mozilla.gecko.gfx.Layer | |
RectF | getBounds (RenderContext context) |
Given the intrinsic size of the layer, returns the pixel boundaries of the layer rect. More... | |
boolean | inTransaction () |
Returns true if the layer is currently in a transaction and false otherwise. More... | |
void | performUpdates (RenderContext context) |
Subclasses may override this method to perform custom layer updates. More... | |
final void | fillRectCoordBuffer (float[] dest, RectF rect, float viewWidth, float viewHeight, Rect cropRect, float texWidth, float texHeight) |
This function fills in the provided dest array with values to render a texture. More... | |
Protected Attributes inherited from org.mozilla.gecko.gfx.TileLayer | |
final CairoImage | mImage |
Protected Attributes inherited from org.mozilla.gecko.gfx.Layer | |
Rect | mPosition |
float | mResolution |
boolean | mUsesDefaultProgram = true |
Encapsulates the logic needed to draw a nine-patch bitmap using OpenGL ES.
For more information on nine-patch bitmaps, see the following document: http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch
Definition at line 19 of file NinePatchTileLayer.java.
|
inline |
Definition at line 23 of file NinePatchTileLayer.java.
References org.mozilla.gecko.gfx.TileLayer.PaintMode.NORMAL.
|
inline |
Subclasses override this function to draw the layer.
Reimplemented from org.mozilla.gecko.gfx.Layer.
Definition at line 28 of file NinePatchTileLayer.java.
References org.mozilla.gecko.gfx.NinePatchTileLayer.drawPatches(), org.mozilla.gecko.gfx.TileLayer.getTextureID(), and org.mozilla.gecko.gfx.TileLayer.initialized().
Referenced by org.mozilla.gecko.gfx.LayerRenderer.Frame.drawBackground().
|
inlineprivate |
Definition at line 73 of file NinePatchTileLayer.java.
References org.mozilla.gecko.gfx.Layer.RenderContext.coordBuffer, org.mozilla.gecko.gfx.NinePatchTileLayer.PATCH_SIZE, org.mozilla.gecko.gfx.Layer.RenderContext.positionHandle, org.mozilla.gecko.gfx.NinePatchTileLayer.TEXTURE_SIZE, org.mozilla.gecko.gfx.Layer.RenderContext.textureHandle, and org.mozilla.gecko.gfx.Layer.RenderContext.viewport.
Referenced by org.mozilla.gecko.gfx.NinePatchTileLayer.drawPatches().
|
inlineprivate |
Definition at line 39 of file NinePatchTileLayer.java.
References org.mozilla.gecko.gfx.NinePatchTileLayer.drawPatch(), org.mozilla.gecko.gfx.Layer.RenderContext.pageRect, and org.mozilla.gecko.gfx.NinePatchTileLayer.PATCH_SIZE.
Referenced by org.mozilla.gecko.gfx.NinePatchTileLayer.draw().
|
staticprivate |
Definition at line 20 of file NinePatchTileLayer.java.
Referenced by org.mozilla.gecko.gfx.NinePatchTileLayer.drawPatch(), and org.mozilla.gecko.gfx.NinePatchTileLayer.drawPatches().
|
staticprivate |
Definition at line 21 of file NinePatchTileLayer.java.
Referenced by org.mozilla.gecko.gfx.NinePatchTileLayer.drawPatch().