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) Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()booleanIndicates whether some other object is "equal to" this one.final ClassgetClass()Returns the runtime class of an object.inthashCode()Returns a hash code value for the object.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.toString()Returns a string representation of the object.final voidwait()Causes current thread to wait until another thread invokes the method or the method for this object.final voidwait(long timeout) Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.final voidwait(long timeout, int nanos) Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
-
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()
-