/**@class android.graphics.NinePatch @extends java.lang.Object The NinePatch class permits drawing a bitmap in nine or more sections. Essentially, it allows the creation of custom graphics that will scale the way that you define, when content added within the image exceeds the normal bounds of the graphic. For a thorough explanation of a NinePatch image, read the discussion in the <a href="{@docRoot}guide/topics/graphics/2d-graphics.html#nine-patch">2D Graphics</a> document. <p> The <a href="{@docRoot}guide/developing/tools/draw9patch.html">Draw 9-Patch</a> tool offers an extremely handy way to create your NinePatch images, using a WYSIWYG graphics editor. </p> */ var NinePatch = { /** Used by native code. This pointer is an instance of Res_png_9patch*. @hide */ mNativeChunk : "null", /**Returns the name of this NinePatch object if one was specified when calling the constructor. */ getName : function( ) {}, /**Returns the paint used to draw this NinePatch. The paint can be null. @see #setPaint(Paint) @see #draw(Canvas, Rect) @see #draw(Canvas, RectF) */ getPaint : function( ) {}, /**Sets the paint to use when drawing the NinePatch. @param {Object {Paint}} p The paint that will be used to draw this NinePatch. @see #getPaint() @see #draw(Canvas, Rect) @see #draw(Canvas, RectF) */ setPaint : function( ) {}, /**Returns the bitmap used to draw this NinePatch. */ getBitmap : function( ) {}, /**Draws the NinePatch. This method will use the paint returned by {@link #getPaint}(). @param {Object {Canvas}} canvas A container for the current matrix and clip used to draw the NinePatch. @param {Object {RectF}} location Where to draw the NinePatch. */ draw : function( ) {}, /**Draws the NinePatch. This method will use the paint returned by {@link #getPaint}(). @param {Object {Canvas}} canvas A container for the current matrix and clip used to draw the NinePatch. @param {Object {Rect}} location Where to draw the NinePatch. */ draw : function( ) {}, /**Draws the NinePatch. This method will ignore the paint returned by {@link #getPaint}() and use the specified paint instead. @param {Object {Canvas}} canvas A container for the current matrix and clip used to draw the NinePatch. @param {Object {Rect}} location Where to draw the NinePatch. @param {Object {Paint}} paint The Paint to draw through. */ draw : function( ) {}, /**Return the underlying bitmap's density, as per {@link android.graphics.Bitmap#getDensity() android.graphics.Bitmap.getDensity()}. */ getDensity : function( ) {}, /**Returns the intrinsic width, in pixels, of this NinePatch. This is equivalent to querying the width of the underlying bitmap returned by {@link #getBitmap}(). */ getWidth : function( ) {}, /**Returns the intrinsic height, in pixels, of this NinePatch. This is equivalent to querying the height of the underlying bitmap returned by {@link #getBitmap}(). */ getHeight : function( ) {}, /**Indicates whether this NinePatch contains transparent or translucent pixels. This is equivalent to calling <code>getBitmap().hasAlpha()</code> on this NinePatch. */ hasAlpha : function( ) {}, /**Returns a {@link android.graphics.Region} representing the parts of the NinePatch that are completely transparent. @param {Object {Rect}} bounds The location and size of the NinePatch. @return {Object {android.graphics.Region}} null if the NinePatch has no transparent region to report, else a {@link Region} holding the parts of the specified bounds that are transparent. */ getTransparentRegion : function( ) {}, /**Verifies that the specified byte array is a valid 9-patch data chunk. @param {Object {byte[]}} chunk A byte array representing a 9-patch data chunk. @return {Boolean} True if the specified byte array represents a 9-patch data chunk, false otherwise. */ isNinePatchChunk : function( ) {}, };