Developer   API   Graphics   Paint

  •  Config(0)
  •  Properties(28)
  •  Methods(3)
  •  Events(0)

Paint(native)

The Paint class holds the style and color information about how to draw geometries, text and bitmaps.

Properties

  • alpha : Integer
    Helper to getColor() that just setting or returning the color's alpha value.
  • antiAlias : Boolean
    Helper for Flags, setting or returning AntiAlias
  • color : Float
    Paint's color.
  • colorFilter : ColorFilter
    ColorFilter.
  • fakeBoldText : Boolean
    Helper for Flags, setting or returning FakeBold
  • fontAscent : Float
    The recommended distance above the baseline (will be <= 0).
  • fontAvgCharWidth : Float
    The average charactor width (>= 0)
  • fontBottom : Float
    The greatest distance below the baseline for any glyph (will be >= 0).
  • fontDescent : Float
    The recommended distance below the baseline (will be >= 0).
  • fontLeading : Float
    The recommended distance to add between lines of text (will be >= 0).
  • fontSpacing : Float
    Return the recommend line spacing. This will be Descent - Ascent + Leading
  • fontTop : Float
    The greatest distance above the baseline for any glyph (will be <= 0).
  • fontXHeight : Float
    The height of an 'x' in px, or 0 if no 'x' in face
  • fontXMax : Float
    The maximum bounding box x value for all glyphs.
  • fontXMin : Float
    The minimum bounding box x value for all glyphs.
  • linearText : Boolean
    Helper for Flags, setting or returning LinearText
  • maskFilter : MaskFilter
    Paint's maskfilter object. Pass NULL to clear any previous maskfilter. As a convenience, the parameter passed is also returned.
  • shader : Shader
    Shader object. Pass NULL to clear any previous shader.
  • strikeThruText : Boolean
    Helper for Flags, setting or returning UnderlineText
  • strokeCap : Symbol
    Paint's stroke cap type, controlling how the start and end of stroked lines and paths are treated.
  • strokeJoin : Symbol
    Paint's stroke join type.
  • strokeWidth : Float
    Width for stroking. A value of 0 strokes in hairline mode. Hairlines always draw 1-pixel wide, regardless of the matrix.
  • style : Symbol
    Setting or returning paint's style, used for controlling how primitives' geometries are interpreted.
  • subpixelText : Boolean
    Helper for Flags, setting or returning SubpixelText
  • textAlign : Symbol
    Paint's Align value for drawing text. This property is used by Canvas.drawTextBox function.
  • textSize : Float
    Paint's text size.
  • typeface : Typeface
    Tpeface object. The typeface object identifies which font to use when drawing or measuring text.
  • underlineText : Boolean
    Helper for Flags, setting or returning UnderlineText

Methods

  • measureText(text) : Multivalue
    Return the width and the height of the text.
  • reset()
    Restores the paint to its initial settings.
  • this() : Paint
    Object constructor creates new Paint object.
API Navigation
Skip Navigation Links.
Expand <span>User Interface</span> User Interface
Expand <span>Core & System</span> Core & System
Collapse <span>Graphics</span> Graphics
Canvas
Paint
Bitmap
Typeface
Path
Matrix
Shader
ColorFilter
MaskFilter
Expand <span>Files and Databases</span> Files and Databases
Expand <span>Crypto</span> Crypto
Expand <span>Native User Interface</span> Native User Interface
Expand <span>Net</span> Net
Expand <span>Media</span> Media
Expand <span>Sensor</span> Sensor
Expand <span>Game Development</span> Game Development