LibreOffice Module android (master) 1
Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
org.mozilla.gecko.gfx.NinePatchTileLayer Class Reference

Encapsulates the logic needed to draw a nine-patch bitmap using OpenGL ES. More...

Inheritance diagram for org.mozilla.gecko.gfx.NinePatchTileLayer:
[legend]
Collaboration diagram for org.mozilla.gecko.gfx.NinePatchTileLayer:
[legend]

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ NinePatchTileLayer()

org.mozilla.gecko.gfx.NinePatchTileLayer.NinePatchTileLayer ( CairoImage  image)
inline

Member Function Documentation

◆ draw()

void org.mozilla.gecko.gfx.NinePatchTileLayer.draw ( RenderContext  context)
inline

◆ drawPatch()

void org.mozilla.gecko.gfx.NinePatchTileLayer.drawPatch ( RenderContext  context,
int  textureX,
int  textureY,
float  tileX,
float  tileY,
float  tileWidth,
float  tileHeight 
)
inlineprivate

◆ drawPatches()

void org.mozilla.gecko.gfx.NinePatchTileLayer.drawPatches ( RenderContext  context)
inlineprivate

Member Data Documentation

◆ PATCH_SIZE

final int org.mozilla.gecko.gfx.NinePatchTileLayer.PATCH_SIZE = 16
staticprivate

◆ TEXTURE_SIZE

final int org.mozilla.gecko.gfx.NinePatchTileLayer.TEXTURE_SIZE = 64
staticprivate

The documentation for this class was generated from the following file: