# Class Paint

java.lang.Object
com.codename1.charts.compat.Paint

public class Paint extends Object
DO NOT USE. Compatibility class used internally by the Charts API.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `Paint.Align`
  `static class`
  `Paint.Cap`
  `static class`
  `Paint.Join`
  `static enum`
  `Paint.Style`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Paint()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `breakText(String text, boolean measureForwards, float maxWidth, float[] measuredWidth)`
  `int`
  `getColor()`
  `int`
  `getStrokeCap()`
  `int`
  `getStrokeJoin()`
  `float`
  `getStrokeMiter()`
  `float`
  `getStrokeWidth()`
  `Paint.Style`
  `getStyle()`
  `int`
  `getTextAlign()`
  `void`
  `getTextBounds(String string, int start, int count, Rectangle2D rect)`
  `float`
  `getTextSize()`
  `void`
  `getTextWidths(String text, float[] widths)`
  `Font`
  `getTypeface()`
  `float`
  `measureText(char[] chars, int start, int count)`
  `float`
  `measureText(String newText)`
  `void`
  `setAntiAlias(boolean antialiasing)`
  `void`
  `setColor(int color)`
  `void`
  `setStrokeCap(int cap)`
  `void`
  `setStrokeJoin(int join)`
  `void`
  `setStrokeMiter(float miter)`
  `void`
  `setStrokeWidth(float i)`
  `void`
  `setStyle(Paint.Style style)`
  `void`
  `setTextAlign(int align)`
  `void`
  `setTextSize(float size)`
  `void`
  `setTypeface(Font textTypeface)`
  `String`
  `toString()`
  Returns a string representation of the object.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Paint

    public Paint()

- ## Method Details

  - ### getTextWidths

    public void getTextWidths(String text, float[] widths)

  - ### breakText

    public int breakText(String text, boolean measureForwards, float maxWidth, float[] measuredWidth)

  - ### getTextBounds

    public void getTextBounds(String string, int start, int count, Rectangle2D rect)

  - ### measureText

    public float measureText(String newText)

  - ### measureText

    public float measureText(char[] chars, int start, int count)

  - ### setAntiAlias

    public void setAntiAlias(boolean antialiasing)

  - ### getTypeface

    public Font getTypeface()

  - ### setTypeface

    public void setTypeface(Font textTypeface)

  - ### getStrokeCap

    public int getStrokeCap()

  - ### setStrokeCap

    public void setStrokeCap(int cap)

  - ### getStrokeJoin

    public int getStrokeJoin()

  - ### setStrokeJoin

    public void setStrokeJoin(int join)

  - ### getStrokeMiter

    public float getStrokeMiter()

  - ### setStrokeMiter

    public void setStrokeMiter(float miter)

  - ### getStyle

    public Paint.Style getStyle()

  - ### setStyle

    public void setStyle(Paint.Style style)

  - ### getStrokeWidth

    public float getStrokeWidth()

  - ### setStrokeWidth

    public void setStrokeWidth(float i)

  - ### getColor

    public int getColor()

  - ### setColor

    public void setColor(int color)

  - ### getTextAlign

    public int getTextAlign()

  - ### setTextAlign

    public void setTextAlign(int align)

  - ### getTextSize

    public float getTextSize()

  - ### setTextSize

    public void setTextSize(float size)

  - ### toString

    public String toString()
    Description copied from class: `Object`
    Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method. The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of: getClass().getName() + '@' + Integer.toHexString(hashCode())
    Overrides:
      `toString` in class `Object`