Class Canvas
java.lang.Object
com.codename1.charts.compat.Canvas
An internal compatibility class for use by the Charts library. Since the library was ported from an Android library, it made use of Canvas and Paint, so rather than rewriting all of this, we added a Canvas and Paint compatibility layer.
DO NOT USE DIRECTLY
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddrawArc(Rectangle2D oval, float currentAngle, float sweepAngle, boolean useCenter, Paint paint) voiddrawArcWithGradient(Rectangle2D oval, float currentAngle, float sweepAngle, boolean useCenter, Paint paint, GradientDrawable gradient) voiddrawBitmap(Image img, float left, float top, Paint paint) voiddrawCircle(float cx, float cy, float r, Paint paint) voidvoidvoidvoidvoiddrawRoundRect(Rectangle2D rect, float rx, float ry, Paint mPaint) voidvoidgetClipBounds(Rectangle mRect) intintgetWidth()booleanvoidrotate(float angle, float x, float y) voidscale(float x, float y) voidtranslate(float x, float y)
-
Field Details
-
g
-
bounds
-
absoluteX
public int absoluteX -
absoluteY
public int absoluteY
-
-
Constructor Details
-
Canvas
public Canvas()
-
-
Method Details
-
getClipBounds
-
drawRect
-
drawText
-
getHeight
public int getHeight() -
getWidth
public int getWidth() -
drawPath
-
drawLine
-
rotate
public void rotate(float angle, float x, float y) -
scale
public void scale(float x, float y) -
translate
public void translate(float x, float y) -
drawCircle
-
drawArc
public void drawArc(Rectangle2D oval, float currentAngle, float sweepAngle, boolean useCenter, Paint paint) -
drawArcWithGradient
public void drawArcWithGradient(Rectangle2D oval, float currentAngle, float sweepAngle, boolean useCenter, Paint paint, GradientDrawable gradient) -
drawPoint
-
drawRoundRect
-
drawBitmap
-
isShapeClipSupported
public boolean isShapeClipSupported()
-