code
stringlengths
11
173k
docstring
stringlengths
2
593k
func_name
stringlengths
2
189
language
stringclasses
1 value
repo
stringclasses
844 values
path
stringlengths
11
294
url
stringlengths
60
339
license
stringclasses
4 values
public boolean conservativelyContainsRect(Rect rect) { try { Stats.onNativeCall(); return _nConservativelyContainsRect(_ptr, rect._left, rect._top, rect._right, rect._bottom); } finally { Reference.reachabilityFence(this); } }
<p>Returns true if rect is contained by Path. May return false when rect is contained by Path.</p> <p>For now, only returns true if Path has one contour and is convex. rect may share points and edges with Path and be contained. Returns true if rect is empty, that is, it has zero width or height; and the Point or line described by rect is contained by Path.</p> @param rect Rect, line, or Point checked for containment @return true if rect is contained @see <a href="https://fiddle.skia.org/c/@Path_conservativelyContainsRect">https://fiddle.skia.org/c/@Path_conservativelyContainsRect</a>
Path::conservativelyContainsRect
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path incReserve(int extraPtCount) { Stats.onNativeCall(); _nIncReserve(_ptr, extraPtCount); return this; }
<p>Grows Path verb array and Point array to contain extraPtCount additional Point. May improve performance and use less memory by reducing the number and size of allocations when creating Path.</p> @param extraPtCount number of additional Point to allocate @return this @see <a href="https://fiddle.skia.org/c/@Path_incReserve">https://fiddle.skia.org/c/@Path_incReserve</a>
Path::incReserve
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path moveTo(float x, float y) { Stats.onNativeCall(); _nMoveTo(_ptr, x, y); return this; }
Adds beginning of contour at Point (x, y). @param x x-axis value of contour start @param y y-axis value of contour start @return reference to Path @see <a href="https://fiddle.skia.org/c/@Path_moveTo">https://fiddle.skia.org/c/@Path_moveTo</a>
Path::moveTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path moveTo(Point p) { return moveTo(p._x, p._y); }
Adds beginning of contour at Point p. @param p contour start @return this
Path::moveTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path rMoveTo(float dx, float dy) { Stats.onNativeCall(); _nRMoveTo(_ptr, dx, dy); return this; }
<p>Adds beginning of contour relative to last point.</p> <p>If Path is empty, starts contour at (dx, dy). Otherwise, start contour at last point offset by (dx, dy). Function name stands for "relative move to".</p> @param dx offset from last point to contour start on x-axis @param dy offset from last point to contour start on y-axis @return reference to Path @see <a href="https://fiddle.skia.org/c/@Path_rMoveTo">https://fiddle.skia.org/c/@Path_rMoveTo</a>
Path::rMoveTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path lineTo(float x, float y) { Stats.onNativeCall(); _nLineTo(_ptr, x, y); return this; }
<p>Adds line from last point to (x, y). If Path is empty, or last Verb is {@link PathVerb#CLOSE}, last point is set to (0, 0) before adding line.</p> <p>lineTo() appends {@link PathVerb#MOVE} to verb array and (0, 0) to Point array, if needed. lineTo() then appends {@link PathVerb#LINE} to verb array and (x, y) to Point array.</p> @param x end of added line on x-axis @param y end of added line on y-axis @return this @see <a href="https://fiddle.skia.org/c/@Path_lineTo">https://fiddle.skia.org/c/@Path_lineTo</a>
Path::lineTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path lineTo(Point p) { return lineTo(p._x, p._y); }
<p>Adds line from last point to Point p. If Path is empty, or last {@link PathVerb} is {@link PathVerb#CLOSE}, last point is set to (0, 0) before adding line.</p> <p>lineTo() first appends {@link PathVerb#MOVE} to verb array and (0, 0) to Point array, if needed. lineTo() then appends {@link PathVerb#LINE} to verb array and Point p to Point array.</p> @param p end Point of added line @return reference to Path
Path::lineTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path rLineTo(float dx, float dy) { Stats.onNativeCall(); _nRLineTo(_ptr, dx, dy); return this; }
<p>Adds line from last point to vector (dx, dy). If Path is empty, or last {@link PathVerb} is {@link PathVerb#CLOSE}, last point is set to (0, 0) before adding line.</p> <p>Appends {@link PathVerb#MOVE} to verb array and (0, 0) to Point array, if needed; then appends {@link PathVerb#LINE} to verb array and line end to Point array.</p> <p>Line end is last point plus vector (dx, dy).</p> <p>Function name stands for "relative line to".</p> @param dx offset from last point to line end on x-axis @param dy offset from last point to line end on y-axis @return reference to Path @see <a href="https://fiddle.skia.org/c/@Path_rLineTo">https://fiddle.skia.org/c/@Path_rLineTo</a> @see <a href="https://fiddle.skia.org/c/@Quad_a">https://fiddle.skia.org/c/@Quad_a</a> @see <a href="https://fiddle.skia.org/c/@Quad_b">https://fiddle.skia.org/c/@Quad_b</a>
Path::rLineTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path quadTo(float x1, float y1, float x2, float y2) { Stats.onNativeCall(); _nQuadTo(_ptr, x1, y1, x2, y2); return this; }
Adds quad from last point towards (x1, y1), to (x2, y2). If Path is empty, or last {@link PathVerb} is {@link PathVerb#CLOSE}, last point is set to (0, 0) before adding quad. Appends {@link PathVerb#MOVE} to verb array and (0, 0) to Point array, if needed; then appends {@link PathVerb#QUAD} to verb array; and (x1, y1), (x2, y2) to Point array. @param x1 control Point of quad on x-axis @param y1 control Point of quad on y-axis @param x2 end Point of quad on x-axis @param y2 end Point of quad on y-axis @return reference to Path @see <a href="https://fiddle.skia.org/c/@Path_quadTo">https://fiddle.skia.org/c/@Path_quadTo</a>
Path::quadTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path quadTo(Point p1, Point p2) { return quadTo(p1._x, p1._y, p2._x, p2._y); }
<p>Adds quad from last point towards Point p1, to Point p2.</p> <p>If Path is empty, or last {@link PathVerb} is {@link PathVerb#CLOSE}, last point is set to (0, 0) before adding quad.</p> <p>Appends {@link PathVerb#MOVE} to verb array and (0, 0) to Point array, if needed; then appends {@link PathVerb#QUAD} to verb array; and Point p1, p2 to Point array.</p> @param p1 control Point of added quad @param p2 end Point of added quad @return reference to Path
Path::quadTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path rQuadTo(float dx1, float dy1, float dx2, float dy2) { Stats.onNativeCall(); _nRQuadTo(_ptr, dx1, dy1, dx2, dy2); return this; }
<p>Adds quad from last point towards vector (dx1, dy1), to vector (dx2, dy2). If Path is empty, or last {@link PathVerb} is {@link PathVerb#CLOSE}, last point is set to (0, 0) before adding quad.</p> <p>Appends {@link PathVerb#MOVE} to verb array and (0, 0) to Point array, if needed; then appends {@link PathVerb#QUAD} to verb array; and appends quad control and quad end to Point array.</p> <p>Quad control is last point plus vector (dx1, dy1).</p> <p>Quad end is last point plus vector (dx2, dy2).</p> <p>Function name stands for "relative quad to".</p> @param dx1 offset from last point to quad control on x-axis @param dy1 offset from last point to quad control on y-axis @param dx2 offset from last point to quad end on x-axis @param dy2 offset from last point to quad end on y-axis @return reference to Path @see <a href="https://fiddle.skia.org/c/@Conic_Weight_a">https://fiddle.skia.org/c/@Conic_Weight_a</a> @see <a href="https://fiddle.skia.org/c/@Conic_Weight_b">https://fiddle.skia.org/c/@Conic_Weight_b</a> @see <a href="https://fiddle.skia.org/c/@Conic_Weight_c">https://fiddle.skia.org/c/@Conic_Weight_c</a> @see <a href="https://fiddle.skia.org/c/@Path_rQuadTo">https://fiddle.skia.org/c/@Path_rQuadTo</a>
Path::rQuadTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path conicTo(float x1, float y1, float x2, float y2, float w) { Stats.onNativeCall(); _nConicTo(_ptr, x1, y1, x2, y2, w); return this; }
<p>Adds conic from last point towards (x1, y1), to (x2, y2), weighted by w.</p> <p>If Path is empty, or last {@link PathVerb} is {@link PathVerb#CLOSE}, last point is set to (0, 0) before adding conic.</p> <p>Appends {@link PathVerb#MOVE} to verb array and (0, 0) to Point array, if needed.</p> <p>If w is finite and not one, appends {@link PathVerb#CONIC} to verb array; and (x1, y1), (x2, y2) to Point array; and w to conic weights.</p> <p>If w is one, appends {@link PathVerb#QUAD} to verb array, and (x1, y1), (x2, y2) to Point array.</p> <p>If w is not finite, appends {@link PathVerb#LINE} twice to verb array, and (x1, y1), (x2, y2) to Point array.</p> @param x1 control Point of conic on x-axis @param y1 control Point of conic on y-axis @param x2 end Point of conic on x-axis @param y2 end Point of conic on y-axis @param w weight of added conic @return reference to Path
Path::conicTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path conicTo(Point p1, Point p2, float w) { return conicTo(p1._x, p1._y, p2._x, p2._y, w); }
<p>Adds conic from last point towards Point p1, to Point p2, weighted by w.</p> <p>If Path is empty, or last {@link PathVerb} is {@link PathVerb#CLOSE}, last point is set to (0, 0) before adding conic.</p> <p>Appends {@link PathVerb#MOVE} to verb array and (0, 0) to Point array, if needed.</p> <p>If w is finite and not one, appends {@link PathVerb#CONIC} to verb array; and Point p1, p2 to Point array; and w to conic weights.</p> <p>If w is one, appends {@link PathVerb#QUAD} to verb array, and Point p1, p2 to Point array.</p> <p>If w is not finite, appends {@link PathVerb#LINE} twice to verb array, and Point p1, p2 to Point array.</p> @param p1 control Point of added conic @param p2 end Point of added conic @param w weight of added conic @return reference to Path
Path::conicTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path rConicTo(float dx1, float dy1, float dx2, float dy2, float w) { Stats.onNativeCall(); _nRConicTo(_ptr, dx1, dy1, dx2, dy2, w); return this; }
<p>Adds conic from last point towards vector (dx1, dy1), to vector (dx2, dy2), weighted by w. If Path is empty, or last {@link PathVerb} is {@link PathVerb#CLOSE}, last point is set to (0, 0) before adding conic.</p> <p>Appends {@link PathVerb#MOVE} to verb array and (0, 0) to Point array, if needed.</p> <p>If w is finite and not one, next appends {@link PathVerb#CONIC} to verb array, and w is recorded as conic weight; otherwise, if w is one, appends {@link PathVerb#QUAD} to verb array; or if w is not finite, appends {@link PathVerb#LINE} twice to verb array.</p> <p>In all cases appends Point control and end to Point array. control is last point plus vector (dx1, dy1). end is last point plus vector (dx2, dy2).</p> <p>Function name stands for "relative conic to".</p> @param dx1 offset from last point to conic control on x-axis @param dy1 offset from last point to conic control on y-axis @param dx2 offset from last point to conic end on x-axis @param dy2 offset from last point to conic end on y-axis @param w weight of added conic @return reference to Path
Path::rConicTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path cubicTo(float x1, float y1, float x2, float y2, float x3, float y3) { Stats.onNativeCall(); _nCubicTo(_ptr, x1, y1, x2, y2, x3, y3); return this; }
<p>Adds cubic from last point towards (x1, y1), then towards (x2, y2), ending at (x3, y3). If Path is empty, or last {@link PathVerb} is {@link PathVerb#CLOSE}, last point is set to (0, 0) before adding cubic.</p> <p>Appends {@link PathVerb#MOVE} to verb array and (0, 0) to Point array, if needed; then appends {@link PathVerb#CUBIC} to verb array; and (x1, y1), (x2, y2), (x3, y3) to Point array.</p> @param x1 first control Point of cubic on x-axis @param y1 first control Point of cubic on y-axis @param x2 second control Point of cubic on x-axis @param y2 second control Point of cubic on y-axis @param x3 end Point of cubic on x-axis @param y3 end Point of cubic on y-axis @return reference to Path
Path::cubicTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path cubicTo(Point p1, Point p2, Point p3) { return cubicTo(p1._x, p1._y, p2._x, p2._y, p3._x, p3._y); }
<p>Adds cubic from last point towards Point p1, then towards Point p2, ending at Point p3. If Path is empty, or last {@link PathVerb} is {@link PathVerb#CLOSE}, last point is set to (0, 0) before adding cubic.</p> <p>Appends {@link PathVerb#MOVE} to verb array and (0, 0) to Point array, if needed; then appends {@link PathVerb#CUBIC} to verb array; and Point p1, p2, p3 to Point array.</p> @param p1 first control Point of cubic @param p2 second control Point of cubic @param p3 end Point of cubic @return reference to Path
Path::cubicTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path rCubicTo(float dx1, float dy1, float dx2, float dy2, float dx3, float dy3) { Stats.onNativeCall(); _nRCubicTo(_ptr, dx1, dy1, dx2, dy2, dx3, dy3); return this; }
<p>Adds cubic from last point towards vector (dx1, dy1), then towards vector (dx2, dy2), to vector (dx3, dy3). If Path is empty, or last {@link PathVerb} is {@link PathVerb#CLOSE}, last point is set to (0, 0) before adding cubic.</p> <p>Appends {@link PathVerb#MOVE} to verb array and (0, 0) to Point array, if needed; then appends {@link PathVerb#CUBIC} to verb array; and appends cubic control and cubic end to Point array.</p> <p>Cubic control is last point plus vector (dx1, dy1).</p> <p>Cubic end is last point plus vector (dx2, dy2).</p> <p>Function name stands for "relative cubic to".</p> @param dx1 offset from last point to first cubic control on x-axis @param dy1 offset from last point to first cubic control on y-axis @param dx2 offset from last point to second cubic control on x-axis @param dy2 offset from last point to second cubic control on y-axis @param dx3 offset from last point to cubic end on x-axis @param dy3 offset from last point to cubic end on y-axis @return reference to Path
Path::rCubicTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path arcTo(Rect oval, float startAngle, float sweepAngle, boolean forceMoveTo) { Stats.onNativeCall(); _nArcTo(_ptr, oval._left, oval._top, oval._right, oval._bottom, startAngle, sweepAngle, forceMoveTo); return this; }
<p>Appends arc to Path. Arc added is part of ellipse bounded by oval, from startAngle through sweepAngle. Both startAngle and sweepAngle are measured in degrees, where zero degrees is aligned with the positive x-axis, and positive sweeps extends arc clockwise.</p> <p>arcTo() adds line connecting Path last Point to initial arc Point if forceMoveTo is false and Path is not empty. Otherwise, added contour begins with first point of arc. Angles greater than -360 and less than 360 are treated modulo 360.</p> @param oval bounds of ellipse containing arc @param startAngle starting angle of arc in degrees @param sweepAngle sweep, in degrees. Positive is clockwise; treated modulo 360 @param forceMoveTo true to start a new contour with arc @return reference to Path @see <a href="https://fiddle.skia.org/c/@Path_arcTo">https://fiddle.skia.org/c/@Path_arcTo</a>
Path::arcTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path tangentArcTo(float x1, float y1, float x2, float y2, float radius) { Stats.onNativeCall(); _nTangentArcTo(_ptr, x1, y1, x2, y2, radius); return this; }
<p>Appends arc to Path, after appending line if needed. Arc is implemented by conic weighted to describe part of circle. Arc is contained by tangent from last Path point to (x1, y1), and tangent from (x1, y1) to (x2, y2). Arc is part of circle sized to radius, positioned so it touches both tangent lines.</p> <p>If last Path Point does not start Arc, tangentArcTo appends connecting Line to Path. The length of Vector from (x1, y1) to (x2, y2) does not affect Arc.</p> <p>Arc sweep is always less than 180 degrees. If radius is zero, or if tangents are nearly parallel, tangentArcTo appends Line from last Path Point to (x1, y1).</p> <p>tangentArcTo appends at most one Line and one conic.</p> <p>tangentArcTo implements the functionality of PostScript arct and HTML Canvas tangentArcTo.</p> @param x1 x-axis value common to pair of tangents @param y1 y-axis value common to pair of tangents @param x2 x-axis value end of second tangent @param y2 y-axis value end of second tangent @param radius distance from arc to circle center @return reference to Path @see <a href="https://fiddle.skia.org/c/@Path_arcTo_2_a">https://fiddle.skia.org/c/@Path_arcTo_2_a</a> @see <a href="https://fiddle.skia.org/c/@Path_arcTo_2_b">https://fiddle.skia.org/c/@Path_arcTo_2_b</a> @see <a href="https://fiddle.skia.org/c/@Path_arcTo_2_c">https://fiddle.skia.org/c/@Path_arcTo_2_c</a>
Path::tangentArcTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path tangentArcTo(Point p1, Point p2, float radius) { return tangentArcTo(p1._x, p1._y, p2._x, p2._y, radius); }
<p>Appends arc to Path, after appending line if needed. Arc is implemented by conic weighted to describe part of circle. Arc is contained by tangent from last Path point to p1, and tangent from p1 to p2. Arc is part of circle sized to radius, positioned so it touches both tangent lines.</p> <p>If last Path Point does not start arc, tangentArcTo() appends connecting line to Path. The length of vector from p1 to p2 does not affect arc.</p> <p>Arc sweep is always less than 180 degrees. If radius is zero, or if tangents are nearly parallel, tangentArcTo() appends line from last Path Point to p1.</p> <p>tangentArcTo() appends at most one line and one conic.</p> <p>tangentArcTo() implements the functionality of PostScript arct and HTML Canvas tangentArcTo.</p> @param p1 Point common to pair of tangents @param p2 end of second tangent @param radius distance from arc to circle center @return reference to Path
Path::tangentArcTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path ellipticalArcTo(float rx, float ry, float xAxisRotate, PathEllipseArc arc, PathDirection direction, float x, float y) { Stats.onNativeCall(); _nEllipticalArcTo(_ptr, rx, ry, xAxisRotate, arc.ordinal(), direction.ordinal(), x, y); return this; }
<p>Appends arc to Path. Arc is implemented by one or more conics weighted to describe part of oval with radii (rx, ry) rotated by xAxisRotate degrees. Arc curves from last Path Point to (x, y), choosing one of four possible routes: clockwise or counterclockwise, and smaller or larger.</p> <p>Arc sweep is always less than 360 degrees. ellipticalArcTo() appends line to (x, y) if either radii are zero, or if last Path Point equals (x, y). ellipticalArcTo() scales radii (rx, ry) to fit last Path Point and (x, y) if both are greater than zero but too small.</p> <p>ellipticalArcTo() appends up to four conic curves.</p> <p>ellipticalArcTo() implements the functionality of SVG arc, although SVG sweep-flag value is opposite the integer value of sweep; SVG sweep-flag uses 1 for clockwise, while {@link PathDirection#CLOCKWISE} cast to int is zero.</p> @param rx radius on x-axis before x-axis rotation @param ry radius on y-axis before x-axis rotation @param xAxisRotate x-axis rotation in degrees; positive values are clockwise @param arc chooses smaller or larger arc @param direction chooses clockwise or counterclockwise arc @param x end of arc @param y end of arc @return reference to Path
Path::ellipticalArcTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path ellipticalArcTo(Point r, float xAxisRotate, PathEllipseArc arc, PathDirection direction, Point xy) { return ellipticalArcTo(r._x, r._y, xAxisRotate, arc, direction, xy._x, xy._y); }
<p>Appends arc to Path. Arc is implemented by one or more conic weighted to describe part of oval with radii (r.fX, r.fY) rotated by xAxisRotate degrees. Arc curves from last Path Point to (xy.fX, xy.fY), choosing one of four possible routes: clockwise or counterclockwise, and smaller or larger.</p> <p>Arc sweep is always less than 360 degrees. ellipticalArcTo() appends line to xy if either radii are zero, or if last Path Point equals (xy.fX, xy.fY). ellipticalArcTo() scales radii r to fit last Path Point and xy if both are greater than zero but too small to describe an arc.</p> <p>ellipticalArcTo() appends up to four conic curves.</p> <p>ellipticalArcTo() implements the functionality of SVG arc, although SVG sweep-flag value is opposite the integer value of sweep; SVG sweep-flag uses 1 for clockwise, while {@link PathDirection#CLOCKWISE} cast to int is zero.</p> @param r radii on axes before x-axis rotation @param xAxisRotate x-axis rotation in degrees; positive values are clockwise @param arc chooses smaller or larger arc @param direction chooses clockwise or counterclockwise arc @param xy end of arc @return reference to Path
Path::ellipticalArcTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path rEllipticalArcTo(float rx, float ry, float xAxisRotate, PathEllipseArc arc, PathDirection direction, float dx, float dy) { Stats.onNativeCall(); _nREllipticalArcTo(_ptr, rx, ry, xAxisRotate, arc.ordinal(), direction.ordinal(), dx, dy); return this; }
<p>Appends arc to Path, relative to last Path Point. Arc is implemented by one or more conic, weighted to describe part of oval with radii (rx, ry) rotated by xAxisRotate degrees. Arc curves from last Path Point to relative end Point: (dx, dy), choosing one of four possible routes: clockwise or counterclockwise, and smaller or larger. If Path is empty, the start arc Point is (0, 0).</p> <p>Arc sweep is always less than 360 degrees. rEllipticalArcTo() appends line to end Point if either radii are zero, or if last Path Point equals end Point. rEllipticalArcTo() scales radii (rx, ry) to fit last Path Point and end Point if both are greater than zero but too small to describe an arc.</p> <p>rEllipticalArcTo() appends up to four conic curves.</p> <p>rEllipticalArcTo() implements the functionality of svg arc, although SVG "sweep-flag" value is opposite the integer value of sweep; SVG "sweep-flag" uses 1 for clockwise, while {@link PathDirection#CLOCKWISE} cast to int is zero.</p> @param rx radius before x-axis rotation @param ry radius before x-axis rotation @param xAxisRotate x-axis rotation in degrees; positive values are clockwise @param arc chooses smaller or larger arc @param direction chooses clockwise or counterclockwise arc @param dx x-axis offset end of arc from last Path Point @param dy y-axis offset end of arc from last Path Point @return reference to Path
Path::rEllipticalArcTo
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path closePath() { Stats.onNativeCall(); _nClosePath(_ptr); return this; }
<p>Appends {@link PathVerb#CLOSE} to Path. A closed contour connects the first and last Point with line, forming a continuous loop. Open and closed contour draw the same with {@link PaintMode#FILL}. With {@link PaintMode#STROKE}, open contour draws {@link PaintStrokeCap} at contour start and end; closed contour draws {@link PaintStrokeJoin} at contour start and end.</p> <p>closePath() has no effect if Path is empty or last Path {@link PathVerb} is {@link PathVerb#CLOSE}.</p> @return reference to Path @see <a href="https://fiddle.skia.org/c/@Path_close">https://fiddle.skia.org/c/@Path_close</a>
Path::closePath
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public static Point[] convertConicToQuads(Point p0, Point p1, Point p2, float w, int pow2) { Stats.onNativeCall(); return _nConvertConicToQuads(p0._x, p0._y, p1._x, p1._y, p2._x, p2._y, w, pow2); }
<p>Approximates conic with quad array. Conic is constructed from start Point p0, control Point p1, end Point p2, and weight w.</p> <p>Quad array is stored in pts; this storage is supplied by caller.</p> <p>Maximum quad count is 2 to the pow2.</p> <p>Every third point in array shares last Point of previous quad and first Point of next quad. Maximum pts storage size is given by: {@code (1 + 2 * (1 << pow2)).</p>}</p> <p>Returns quad count used the approximation, which may be smaller than the number requested.</p> <p>conic weight determines the amount of influence conic control point has on the curve.</p> <p>w less than one represents an elliptical section. w greater than one represents a hyperbolic section. w equal to one represents a parabolic section.</p> <p>Two quad curves are sufficient to approximate an elliptical conic with a sweep of up to 90 degrees; in this case, set pow2 to one.</p> @param p0 conic start Point @param p1 conic control Point @param p2 conic end Point @param w conic weight @param pow2 quad count, as power of two, normally 0 to 5 (1 to 32 quad curves) @return number of quad curves written to pts
Path::convertConicToQuads
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Rect isRect() { try { Stats.onNativeCall(); return _nIsRect(_ptr); } finally { Reference.reachabilityFence(this); } }
<p>Returns Rect if Path is equivalent to Rect when filled.</p> rect may be smaller than the Path bounds. Path bounds may include {@link PathVerb#MOVE} points that do not alter the area drawn by the returned rect. @return bounds if Path contains Rect, null otherwise @see <a href="https://fiddle.skia.org/c/@Path_isRect">https://fiddle.skia.org/c/@Path_isRect</a>
Path::isRect
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path addRect(Rect rect) { return addRect(rect, PathDirection.CLOCKWISE, 0); }
Adds Rect to Path, appending {@link PathVerb#MOVE}, three {@link PathVerb#LINE}, and {@link PathVerb#CLOSE}, starting with top-left corner of Rect; followed by top-right, bottom-right, and bottom-left. @param rect Rect to add as a closed contour @return reference to Path @see <a href="https://fiddle.skia.org/c/@Path_addRect">https://fiddle.skia.org/c/@Path_addRect</a>
Path::addRect
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path addRect(Rect rect, PathDirection dir) { return addRect(rect, dir, 0); }
Adds Rect to Path, appending {@link PathVerb#MOVE}, three {@link PathVerb#LINE}, and {@link PathVerb#CLOSE}, starting with top-left corner of Rect; followed by top-right, bottom-right, and bottom-left if dir is {@link PathDirection#CLOCKWISE}; or followed by bottom-left, bottom-right, and top-right if dir is {@link PathDirection#COUNTER_CLOCKWISE}. @param rect Rect to add as a closed contour @param dir Direction to wind added contour @return reference to Path @see <a href="https://fiddle.skia.org/c/@Path_addRect">https://fiddle.skia.org/c/@Path_addRect</a>
Path::addRect
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path addRect(Rect rect, PathDirection dir, int start) { Stats.onNativeCall(); _nAddRect(_ptr, rect._left, rect._top, rect._right, rect._bottom, dir.ordinal(), start); return this; }
Adds Rect to Path, appending {@link PathVerb#MOVE}, three {@link PathVerb#LINE}, and {@link PathVerb#CLOSE}. If dir is {@link PathDirection#CLOCKWISE}, Rect corners are added clockwise; if dir is {@link PathDirection#COUNTER_CLOCKWISE}, Rect corners are added counterclockwise. start determines the first corner added. @param rect Rect to add as a closed contour @param dir Direction to wind added contour @param start initial corner of Rect to add. 0 for top left, 1 for top right, 2 for lower right, 3 for lower left @return reference to Path @see <a href="https://fiddle.skia.org/c/@Path_addRect_2">https://fiddle.skia.org/c/@Path_addRect_2</a>
Path::addRect
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path addOval(Rect oval, PathDirection dir) { return addOval(oval, dir, 1); }
<p>Adds oval to path, appending {@link PathVerb#MOVE}, four {@link PathVerb#CONIC}, and {@link PathVerb#CLOSE}.</p> <p>Oval is upright ellipse bounded by Rect oval with radii equal to half oval width and half oval height. Oval begins at (oval.fRight, oval.centerY()) and continues clockwise if dir is {@link PathDirection#CLOCKWISE}, counterclockwise if dir is {@link PathDirection#COUNTER_CLOCKWISE}.</p> @param oval bounds of ellipse added @param dir Direction to wind ellipse @return reference to Path @see <a href="https://fiddle.skia.org/c/@Path_addOval">https://fiddle.skia.org/c/@Path_addOval</a>
Path::addOval
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path addOval(Rect oval, PathDirection dir, int start) { Stats.onNativeCall(); _nAddOval(_ptr, oval._left, oval._top, oval._right, oval._bottom, dir.ordinal(), start); return this; }
Adds oval to Path, appending {@link PathVerb#MOVE}, four {@link PathVerb#CONIC}, and {@link PathVerb#CLOSE}. Oval is upright ellipse bounded by Rect oval with radii equal to half oval width and half oval height. Oval begins at start and continues clockwise if dir is {@link PathDirection#CLOCKWISE}, counterclockwise if dir is {@link PathDirection#COUNTER_CLOCKWISE}. @param oval bounds of ellipse added @param dir Direction to wind ellipse @param start index of initial point of ellipse. 0 for top, 1 for right, 2 for bottom, 3 for left @return reference to Path @see <a href="https://fiddle.skia.org/c/@Path_addOval_2">https://fiddle.skia.org/c/@Path_addOval_2</a>
Path::addOval
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path addCircle(float x, float y, float radius) { return addCircle(x, y, radius, PathDirection.CLOCKWISE); }
<p>Adds circle centered at (x, y) of size radius to Path, appending {@link PathVerb#MOVE}, four {@link PathVerb#CONIC}, and {@link PathVerb#CLOSE}. Circle begins at: (x + radius, y)</p> <p>Has no effect if radius is zero or negative.</p> @param x center of circle @param y center of circle @param radius distance from center to edge @return reference to Path
Path::addCircle
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path addCircle(float x, float y, float radius, PathDirection dir) { Stats.onNativeCall(); _nAddCircle(_ptr, x, y, radius, dir.ordinal()); return this; }
<p>Adds circle centered at (x, y) of size radius to Path, appending {@link PathVerb#MOVE}, four {@link PathVerb#CONIC}, and {@link PathVerb#CLOSE}. Circle begins at: (x + radius, y), continuing clockwise if dir is {@link PathDirection#CLOCKWISE}, and counterclockwise if dir is {@link PathDirection#COUNTER_CLOCKWISE}.</p> <p>Has no effect if radius is zero or negative.</p> @param x center of circle @param y center of circle @param radius distance from center to edge @param dir Direction to wind circle @return reference to Path
Path::addCircle
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path addArc(Rect oval, float startAngle, float sweepAngle) { Stats.onNativeCall(); _nAddArc(_ptr, oval._left, oval._top, oval._right, oval._bottom, startAngle, sweepAngle); return this; }
<p>Appends arc to Path, as the start of new contour. Arc added is part of ellipse bounded by oval, from startAngle through sweepAngle. Both startAngle and sweepAngle are measured in degrees, where zero degrees is aligned with the positive x-axis, and positive sweeps extends arc clockwise.</p> <p>If sweepAngle &le; -360, or sweepAngle &ge; 360; and startAngle modulo 90 is nearly zero, append oval instead of arc. Otherwise, sweepAngle values are treated modulo 360, and arc may or may not draw depending on numeric rounding.</p> @param oval bounds of ellipse containing arc @param startAngle starting angle of arc in degrees @param sweepAngle sweep, in degrees. Positive is clockwise; treated modulo 360 @return reference to Path @see <a href="https://fiddle.skia.org/c/@Path_addArc">https://fiddle.skia.org/c/@Path_addArc</a>
Path::addArc
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path addRRect(RRect rrect) { return addRRect(rrect, PathDirection.CLOCKWISE, 6); }
<p>Adds rrect to Path, creating a new closed contour. RRect starts at top-left of the lower-left corner and winds clockwise.</p> <p>After appending, Path may be empty, or may contain: Rect, Oval, or RRect.</p> @param rrect bounds and radii of rounded rectangle @return reference to Path @see <a href="https://fiddle.skia.org/c/@Path_addRRect">https://fiddle.skia.org/c/@Path_addRRect</a>
Path::addRRect
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path addRRect(RRect rrect, PathDirection dir) { return addRRect(rrect, dir, dir == PathDirection.CLOCKWISE ? 6 : 7); }
<p>Adds rrect to Path, creating a new closed contour. If dir is {@link PathDirection#CLOCKWISE}, rrect starts at top-left of the lower-left corner and winds clockwise. If dir is {@link PathDirection#COUNTER_CLOCKWISE}, rrect starts at the bottom-left of the upper-left corner and winds counterclockwise.</p> <p>After appending, Path may be empty, or may contain: Rect, Oval, or RRect.</p> @param rrect bounds and radii of rounded rectangle @param dir Direction to wind RRect @return reference to Path @see <a href="https://fiddle.skia.org/c/@Path_addRRect">https://fiddle.skia.org/c/@Path_addRRect</a>
Path::addRRect
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path addRRect(RRect rrect, PathDirection dir, int start) { Stats.onNativeCall(); _nAddRRect(_ptr, rrect._left, rrect._top, rrect._right, rrect._bottom, rrect._radii, dir.ordinal(), start); return this; }
<p>Adds rrect to Path, creating a new closed contour. If dir is {@link PathDirection#CLOCKWISE}, rrect winds clockwise; if dir is {@link PathDirection#COUNTER_CLOCKWISE}, rrect winds counterclockwise. start determines the first point of rrect to add.</p> @param rrect bounds and radii of rounded rectangle @param dir Direction to wind RRect @param start index of initial point of RRect. 0 for top-right end of the arc at top left, 1 for top-left end of the arc at top right, 2 for bottom-right end of top right arc, etc. @return reference to Path @see <a href="https://fiddle.skia.org/c/@Path_addRRect_2">https://fiddle.skia.org/c/@Path_addRRect_2</a>
Path::addRRect
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path addPoly(Point[] pts, boolean close) { float[] flat = new float[pts.length * 2]; for (int i = 0; i < pts.length; ++i) { flat[i * 2] = pts[i]._x; flat[i * 2 + 1] = pts[i]._y; } return addPoly(flat, close); }
<p>Adds contour created from line array, adding (pts.length - 1) line segments. Contour added starts at pts[0], then adds a line for every additional Point in pts array. If close is true, appends {@link PathVerb#CLOSE} to Path, connecting pts[pts.length - 1] and pts[0].</p> <p>If pts is empty, append {@link PathVerb#MOVE} to path.</p> @param pts array of line sharing end and start Point @param close true to add line connecting contour end and start @return reference to Path @see <a href="https://fiddle.skia.org/c/@Path_addPoly">https://fiddle.skia.org/c/@Path_addPoly</a>
Path::addPoly
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path addPoly(float[] pts, boolean close) { assert pts.length % 2 == 0 : "Expected even amount of pts, got " + pts.length; Stats.onNativeCall(); _nAddPoly(_ptr, pts, close); return this; }
<p>Adds contour created from line array, adding (pts.length / 2 - 1) line segments. Contour added starts at (pts[0], pts[1]), then adds a line for every additional pair of floats in pts array. If close is true, appends {@link PathVerb#CLOSE} to Path, connecting (pts[count - 2], pts[count - 1]) and (pts[0], pts[1]).</p> <p>If pts is empty, append {@link PathVerb#MOVE} to path.</p> @param pts flat array of line sharing end and start Point @param close true to add line connecting contour end and start @return reference to Path @see <a href="https://fiddle.skia.org/c/@Path_addPoly">https://fiddle.skia.org/c/@Path_addPoly</a>
Path::addPoly
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path addPath(Path src) { return addPath(src, false); }
<p>Appends src to Path.</p> <p>src verb array, Point array, and conic weights are added unaltered.</p> @param src Path verbs, Point, and conic weights to add @return reference to Path
Path::addPath
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path addPath(Path src, boolean extend) { try { Stats.onNativeCall(); _nAddPath(_ptr, Native.getPtr(src), extend); return this; } finally { Reference.reachabilityFence(src); } }
<p>Appends src to Path.</p> <p>If extend is false, src verb array, Point array, and conic weights are added unaltered. If extend is true, add line before appending verbs, Point, and conic weights.</p> @param src Path verbs, Point, and conic weights to add @param extend if should add a line before appending verbs @return reference to Path
Path::addPath
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path addPath(Path src, float dx, float dy) { return addPath(src, dx, dy, false); }
<p>Appends src to Path, offset by (dx, dy).</p> <p>Src verb array, Point array, and conic weights are added unaltered.</p> @param src Path verbs, Point, and conic weights to add @param dx offset added to src Point array x-axis coordinates @param dy offset added to src Point array y-axis coordinates @return reference to Path
Path::addPath
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path addPath(Path src, float dx, float dy, boolean extend) { try { Stats.onNativeCall(); _nAddPathOffset(_ptr, Native.getPtr(src), dx, dy, extend); return this; } finally { Reference.reachabilityFence(src); } }
<p>Appends src to Path, offset by (dx, dy).</p> <p>If extend is false, src verb array, Point array, and conic weights are added unaltered. If extend is true, add line before appending verbs, Point, and conic weights.</p> @param src Path verbs, Point, and conic weights to add @param dx offset added to src Point array x-axis coordinates @param dy offset added to src Point array y-axis coordinates @param extend if should add a line before appending verbs @return reference to Path
Path::addPath
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path addPath(Path src, Matrix33 matrix) { return addPath(src, matrix, false); }
<p>Appends src to Path, transformed by matrix. Transformed curves may have different verbs, Point, and conic weights.</p> <p>Src verb array, Point array, and conic weights are added unaltered.</p> @param src Path verbs, Point, and conic weights to add @param matrix transform applied to src @return reference to Path
Path::addPath
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path addPath(Path src, Matrix33 matrix, boolean extend) { try { Stats.onNativeCall(); _nAddPathTransform(_ptr, Native.getPtr(src), matrix.getMat(), extend); return this; } finally { Reference.reachabilityFence(src); } }
<p>Appends src to Path, transformed by matrix. Transformed curves may have different verbs, Point, and conic weights.</p> <p>If extend is false, src verb array, Point array, and conic weights are added unaltered. If extend is true, add line before appending verbs, Point, and conic weights.</p> @param src Path verbs, Point, and conic weights to add @param matrix transform applied to src @param extend if should add a line before appending verbs @return reference to Path
Path::addPath
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path reverseAddPath(Path src) { try { Stats.onNativeCall(); _nReverseAddPath(_ptr, Native.getPtr(src)); return this; } finally { Reference.reachabilityFence(src); } }
Appends src to Path, from back to front. Reversed src always appends a new contour to Path. @param src Path verbs, Point, and conic weights to add @return reference to Path @see <a href="https://fiddle.skia.org/c/@Path_reverseAddPath">https://fiddle.skia.org/c/@Path_reverseAddPath</a>
Path::reverseAddPath
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path offset(float dx, float dy) { return offset(dx, dy, null); }
Offsets Point array by (dx, dy). Path is replaced by offset data. @param dx offset added to Point array x-axis coordinates @param dy offset added to Point array y-axis coordinates @return this
Path::offset
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path offset(float dx, float dy, Path dst) { try { Stats.onNativeCall(); _nOffset(_ptr, dx, dy, Native.getPtr(dst)); return this; } finally { Reference.reachabilityFence(dst); } }
Offsets Point array by (dx, dy). Offset Path replaces dst. If dst is null, Path is replaced by offset data. @param dx offset added to Point array x-axis coordinates @param dy offset added to Point array y-axis coordinates @param dst overwritten, translated copy of Path; may be null @return this @see <a href="https://fiddle.skia.org/c/@Path_offset">https://fiddle.skia.org/c/@Path_offset</a>
Path::offset
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path transform(Matrix33 matrix) { return transform(matrix, null, true); }
Transforms verb array, Point array, and weight by matrix. transform may change verbs and increase their number. Path is replaced by transformed data. @param matrix matrix to apply to Path @return this
Path::transform
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path transform(Matrix33 matrix, boolean applyPerspectiveClip) { return transform(matrix, null, applyPerspectiveClip); }
Transforms verb array, Point array, and weight by matrix. transform may change verbs and increase their number. Path is replaced by transformed data. @param matrix matrix to apply to Path @param applyPerspectiveClip whether to apply perspective clipping @return this
Path::transform
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path transform(Matrix33 matrix, Path dst) { return transform(matrix, dst, true); }
Transforms verb array, Point array, and weight by matrix. transform may change verbs and increase their number. Transformed Path replaces dst; if dst is null, original data is replaced. @param matrix matrix to apply to Path @param dst overwritten, transformed copy of Path; may be null @return this @see <a href="https://fiddle.skia.org/c/@Path_transform">https://fiddle.skia.org/c/@Path_transform</a>
Path::transform
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path transform(Matrix33 matrix, Path dst, boolean applyPerspectiveClip) { try { Stats.onNativeCall(); _nTransform(_ptr, matrix.getMat(), Native.getPtr(dst), applyPerspectiveClip); return this; } finally { Reference.reachabilityFence(dst); } }
Transforms verb array, Point array, and weight by matrix. transform may change verbs and increase their number. Transformed Path replaces dst; if dst is null, original data is replaced. @param matrix matrix to apply to Path @param dst overwritten, transformed copy of Path; may be null @param applyPerspectiveClip whether to apply perspective clipping @return this @see <a href="https://fiddle.skia.org/c/@Path_transform">https://fiddle.skia.org/c/@Path_transform</a>
Path::transform
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Point getLastPt() { try { Stats.onNativeCall(); return _nGetLastPt(_ptr); } finally { Reference.reachabilityFence(this); } }
Returns last point on Path in lastPt. Returns null if Point array is empty. @return point if Point array contains one or more Point, null otherwise @see <a href="https://fiddle.skia.org/c/@Path_getLastPt">https://fiddle.skia.org/c/@Path_getLastPt</a>
Path::getLastPt
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path setLastPt(float x, float y) { Stats.onNativeCall(); _nSetLastPt(_ptr, x, y); return this; }
Sets last point to (x, y). If Point array is empty, append {@link PathVerb#MOVE} to verb array and append (x, y) to Point array. @param x set x-axis value of last point @param y set y-axis value of last point @return this @see <a href="https://fiddle.skia.org/c/@Path_setLastPt">https://fiddle.skia.org/c/@Path_setLastPt</a>
Path::setLastPt
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path setLastPt(Point p) { return setLastPt(p._x, p._y); }
Sets the last point on the path. If Point array is empty, append {@link PathVerb#MOVE} to verb array and append p to Point array. @param p set value of last point @return this
Path::setLastPt
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public int getSegmentMasks() { try { Stats.onNativeCall(); return _nGetSegmentMasks(_ptr); } finally { Reference.reachabilityFence(this); } }
<p>Returns a mask, where each set bit corresponds to a SegmentMask constant if Path contains one or more verbs of that type.</p> <p>Returns zero if Path contains no lines, or curves: quads, conics, or cubics.</p> <p>getSegmentMasks() returns a cached result; it is very fast.</p> @return SegmentMask bits or zero @see PathSegmentMask#LINE @see PathSegmentMask#QUAD @see PathSegmentMask#CONIC @see PathSegmentMask#CUBIC
Path::getSegmentMasks
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public boolean contains(float x, float y) { try { Stats.onNativeCall(); return _nContains(_ptr, x, y); } finally { Reference.reachabilityFence(this); } }
Returns true if the point (x, y) is contained by Path, taking into account {@link PathFillMode}. @param x x-axis value of containment test @param y y-axis value of containment test @return true if Point is in Path @see <a href="https://fiddle.skia.org/c/@Path_contains">https://fiddle.skia.org/c/@Path_contains</a>
Path::contains
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public boolean contains(Point p) { return contains(p._x, p._y); }
Returns true if the point is contained by Path, taking into account {@link PathFillMode}. @param p point of containment test @return true if Point is in Path @see <a href="https://fiddle.skia.org/c/@Path_contains">https://fiddle.skia.org/c/@Path_contains</a>
Path::contains
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path dump() { Stats.onNativeCall(); _nDump(_ptr); return this; }
Writes text representation of Path to standard output. The representation may be directly compiled as C++ code. Floating point values are written with limited precision; it may not be possible to reconstruct original Path from output. @return this @see <a href="https://fiddle.skia.org/c/@Path_dump_2">https://fiddle.skia.org/c/@Path_dump_2</a>
Path::dump
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public Path dumpHex() { Stats.onNativeCall(); _nDumpHex(_ptr); return this; }
<p>Writes text representation of Path to standard output. The representation may be directly compiled as C++ code. Floating point values are written in hexadecimal to preserve their exact bit pattern. The output reconstructs the original Path.</p> <p>Use instead of {@link dump()} when submitting</p> @return this @see <a href="https://fiddle.skia.org/c/@Path_dumpHex">https://fiddle.skia.org/c/@Path_dumpHex</a>
Path::dumpHex
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public byte[] serializeToBytes() { try { Stats.onNativeCall(); return _nSerializeToBytes(_ptr); } finally { Reference.reachabilityFence(this); } }
<p>Writes Path to byte buffer.</p> <p>Writes {@link PathFillMode}, verb array, Point array, conic weight, and additionally writes computed information like path convexity and bounds.</p> <p>Use only be used in concert with {@link makeFromBytes(byte[])}; the format used for Path in memory is not guaranteed.</p> @return serialized Path; length always a multiple of 4 @see <a href="https://fiddle.skia.org/c/@Path_writeToMemory">https://fiddle.skia.org/c/@Path_writeToMemory</a>
Path::serializeToBytes
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public static Path makeFromBytes(byte[] data) { Stats.onNativeCall(); return new Path(_nMakeFromBytes(data)); }
<p>Initializes Path from byte buffer. Returns null if the buffer is data is inconsistent, or the length is too small.</p> <p>Reads {@link PathFillMode}, verb array, Point array, conic weight, and additionally reads computed information like path convexity and bounds.</p> <p>Used only in concert with {@link serializeToBytes()}; the format used for Path in memory is not guaranteed.</p> @param data storage for Path @return reconstructed Path @see <a href="https://fiddle.skia.org/c/@Path_readFromMemory">https://fiddle.skia.org/c/@Path_readFromMemory</a>
Path::makeFromBytes
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public int getGenerationId() { try { Stats.onNativeCall(); return _nGetGenerationId(_ptr); } finally { Reference.reachabilityFence(this); } }
<p>Returns a non-zero, globally unique value. A different value is returned if verb array, Point array, or conic weight changes.</p> <p>Setting {@link PathFillMode} does not change generation identifier.</p> <p>Each time the path is modified, a different generation identifier will be returned. {@link PathFillMode} does affect generation identifier on Android framework.</p> @return non-zero, globally unique value @see <a href="https://fiddle.skia.org/c/@Path_getGenerationID">https://fiddle.skia.org/c/@Path_getGenerationID</a> @see <a href="https://bugs.chromium.org/p/skia/issues/detail?id=1762">https://bugs.chromium.org/p/skia/issues/detail?id=1762</a>
Path::getGenerationId
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public boolean isValid() { try { Stats.onNativeCall(); return _nIsValid(_ptr); } finally { Reference.reachabilityFence(this); } }
Returns if Path data is consistent. Corrupt Path data is detected if internal values are out of range or internal storage does not match array dimensions. @return true if Path data is consistent
Path::isValid
java
JetBrains/skija
shared/java/Path.java
https://github.com/JetBrains/skija/blob/master/shared/java/Path.java
Apache-2.0
public static Image makeRaster(ImageInfo imageInfo, byte[] bytes, long rowBytes) { try { Stats.onNativeCall(); long ptr = _nMakeRaster(imageInfo._width, imageInfo._height, imageInfo._colorInfo._colorType.ordinal(), imageInfo._colorInfo._alphaType.ordinal(), Native.getPtr(imageInfo._colorInfo._colorSpace), bytes, rowBytes); if (ptr == 0) throw new RuntimeException("Failed to makeRaster " + imageInfo + " " + bytes + " " + rowBytes); return new Image(ptr); } finally { Reference.reachabilityFence(imageInfo._colorInfo._colorSpace); } }
<p>Creates Image from pixels.</p> <p>Image is returned if pixels are valid. Valid Pixmap parameters include:</p> <ul> <li>dimensions are greater than zero;</li> <li>each dimension fits in 29 bits;</li> <li>ColorType and AlphaType are valid, and ColorType is not ColorType.UNKNOWN;</li> <li>row bytes are large enough to hold one row of pixels;</li> <li>pixel address is not null.</li> </ul> @param imageInfo ImageInfo @param bytes pixels array @param rowBytes how many bytes in a row @return Image @see <a href="https://fiddle.skia.org/c/@Image_MakeRasterCopy">https://fiddle.skia.org/c/@Image_MakeRasterCopy</a>
Image::makeRaster
java
JetBrains/skija
shared/java/Image.java
https://github.com/JetBrains/skija/blob/master/shared/java/Image.java
Apache-2.0
public static Image makeRaster(ImageInfo imageInfo, Data data, long rowBytes) { try { Stats.onNativeCall(); long ptr = _nMakeRasterData(imageInfo._width, imageInfo._height, imageInfo._colorInfo._colorType.ordinal(), imageInfo._colorInfo._alphaType.ordinal(), Native.getPtr(imageInfo._colorInfo._colorSpace), Native.getPtr(data), rowBytes); if (ptr == 0) throw new RuntimeException("Failed to makeRaster " + imageInfo + " " + data + " " + rowBytes); return new Image(ptr); } finally { Reference.reachabilityFence(imageInfo._colorInfo._colorSpace); Reference.reachabilityFence(data); } }
<p>Creates Image from pixels.</p> <p>Image is returned if pixels are valid. Valid Pixmap parameters include:</p> <ul> <li>dimensions are greater than zero;</li> <li>each dimension fits in 29 bits;</li> <li>ColorType and AlphaType are valid, and ColorType is not ColorType.UNKNOWN;</li> <li>row bytes are large enough to hold one row of pixels;</li> <li>pixel address is not null.</li> </ul> @param imageInfo ImageInfo @param data pixels array @param rowBytes how many bytes in a row @return Image
Image::makeRaster
java
JetBrains/skija
shared/java/Image.java
https://github.com/JetBrains/skija/blob/master/shared/java/Image.java
Apache-2.0
public boolean readPixels(@Nullable DirectContext context, @NotNull Bitmap dst, int srcX, int srcY, boolean cache) { try { assert dst != null : "Can’t readPixels with dst == null"; return _nReadPixelsBitmap(_ptr, Native.getPtr(context), Native.getPtr(dst), srcX, srcY, cache); } finally { Reference.reachabilityFence(this); Reference.reachabilityFence(context); Reference.reachabilityFence(dst); } }
<p>Copies Rect of pixels from Image to Bitmap. Copy starts at offset (srcX, srcY), and does not exceed Image (getWidth(), getHeight()).</p> <p>dst specifies width, height, ColorType, AlphaType, and ColorSpace of destination.</p> <p>Returns true if pixels are copied. Returns false if:</p> <ul> <li>dst has no pixels allocated.</li> </ul> <p>Pixels are copied only if pixel conversion is possible. If Image ColorType is ColorType.GRAY_8, or ColorType.ALPHA_8; dst.getColorType() must match. If Image ColorType is ColorType.GRAY_8, dst.getColorSpace() must match. If Image AlphaType is AlphaType.OPAQUE, dst.getAlphaType() must match. If Image ColorSpace is null, dst.getColorSpace() must match. Returns false if pixel conversion is not possible.</p> <p>srcX and srcY may be negative to copy only top or left of source. Returns false if getWidth() or getHeight() is zero or negative.</p> <p>Returns false if abs(srcX) &gt;= Image.getWidth(), or if abs(srcY) &gt;= Image.getHeight().</p> <p>If cache is true, pixels may be retained locally, otherwise pixels are not added to the local cache.</p> @param context the DirectContext in play, if it exists @param dst destination bitmap @param srcX column index whose absolute value is less than getWidth() @param srcY row index whose absolute value is less than getHeight() @param cache whether the pixels should be cached locally @return true if pixels are copied to dstPixels
Image::readPixels
java
JetBrains/skija
shared/java/Image.java
https://github.com/JetBrains/skija/blob/master/shared/java/Image.java
Apache-2.0
public Matrix44(float... mat) { assert mat.length == 16 : "Expected 16 elements, got " + mat == null ? null : mat.length; _mat = mat; }
The constructor parameters are in row-major order.
Matrix44::Matrix44
java
JetBrains/skija
shared/java/Matrix44.java
https://github.com/JetBrains/skija/blob/master/shared/java/Matrix44.java
Apache-2.0
public Matrix33 asMatrix33() { return new Matrix33(_mat[0], _mat[1], _mat[3], _mat[4], _mat[5], _mat[7], _mat[12], _mat[13], _mat[15]); }
<p>When converting from Matrix44 to Matrix33, the third row and column is dropped.</p> <pre><code> [ a b _ c ] [ a b c ] [ d e _ f ] -&gt; [ d e f ] [ _ _ _ _ ] [ g h i ] [ g h _ i ] </code></pre>
Matrix44::asMatrix33
java
JetBrains/skija
shared/java/Matrix44.java
https://github.com/JetBrains/skija/blob/master/shared/java/Matrix44.java
Apache-2.0
public int getBytesPerPixel() { return _colorType.getBytesPerPixel(); }
Returns number of bytes per pixel required by ColorType. Returns zero if getColorType() is {@link ColorType#UNKNOWN}. @return bytes in pixel @see <a href="https://fiddle.skia.org/c/@ImageInfo_bytesPerPixel">https://fiddle.skia.org/c/@ImageInfo_bytesPerPixel</a>
ColorInfo::getBytesPerPixel
java
JetBrains/skija
shared/java/ColorInfo.java
https://github.com/JetBrains/skija/blob/master/shared/java/ColorInfo.java
Apache-2.0
public int getShiftPerPixel() { return _colorType.getShiftPerPixel(); }
Returns bit shift converting row bytes to row pixels. Returns zero for {@link ColorType#UNKNOWN}. @return one of: 0, 1, 2, 3, 4; left shift to convert pixels to bytes @see <a href="https://fiddle.skia.org/c/@ImageInfo_shiftPerPixel">https://fiddle.skia.org/c/@ImageInfo_shiftPerPixel</a>
ColorInfo::getShiftPerPixel
java
JetBrains/skija
shared/java/ColorInfo.java
https://github.com/JetBrains/skija/blob/master/shared/java/ColorInfo.java
Apache-2.0
public PathMeasure(Path path) { this(path, false, 1f); }
Initialize the pathmeasure with the specified path. The parts of the path that are needed are copied, so the client is free to modify/delete the path after this call.
PathMeasure::PathMeasure
java
JetBrains/skija
shared/java/PathMeasure.java
https://github.com/JetBrains/skija/blob/master/shared/java/PathMeasure.java
Apache-2.0
public PathMeasure(Path path, boolean forceClosed) { this(path, forceClosed, 1f); }
Initialize the pathmeasure with the specified path. The parts of the path that are needed are copied, so the client is free to modify/delete the path after this call.
PathMeasure::PathMeasure
java
JetBrains/skija
shared/java/PathMeasure.java
https://github.com/JetBrains/skija/blob/master/shared/java/PathMeasure.java
Apache-2.0
public PathMeasure(Path path, boolean forceClosed, float resScale) { this(_nMakePath(Native.getPtr(path), forceClosed, resScale)); Stats.onNativeCall(); Reference.reachabilityFence(path); }
<p>Initialize the pathmeasure with the specified path. The parts of the path that are needed are copied, so the client is free to modify/delete the path after this call.</p> <p>resScale controls the precision of the measure. values &gt; 1 increase the precision (and possible slow down the computation).</p>
PathMeasure::PathMeasure
java
JetBrains/skija
shared/java/PathMeasure.java
https://github.com/JetBrains/skija/blob/master/shared/java/PathMeasure.java
Apache-2.0
public PathMeasure setPath(@Nullable Path path, boolean forceClosed) { try { Stats.onNativeCall(); _nSetPath(_ptr, Native.getPtr(path), forceClosed); return this; } finally { Reference.reachabilityFence(path); } }
Reset the pathmeasure with the specified path. The parts of the path that are needed are copied, so the client is free to modify/delete the path after this call.
PathMeasure::setPath
java
JetBrains/skija
shared/java/PathMeasure.java
https://github.com/JetBrains/skija/blob/master/shared/java/PathMeasure.java
Apache-2.0
public float getLength() { try { Stats.onNativeCall(); return _nGetLength(_ptr); } finally { Reference.reachabilityFence(this); } }
Return the total length of the current contour, or 0 if no path is associated (e.g. resetPath(null))
PathMeasure::getLength
java
JetBrains/skija
shared/java/PathMeasure.java
https://github.com/JetBrains/skija/blob/master/shared/java/PathMeasure.java
Apache-2.0
public boolean isClosed() { try { Stats.onNativeCall(); return _nIsClosed(_ptr); } finally { Reference.reachabilityFence(this); } }
@return true if the current contour is closed.
PathMeasure::isClosed
java
JetBrains/skija
shared/java/PathMeasure.java
https://github.com/JetBrains/skija/blob/master/shared/java/PathMeasure.java
Apache-2.0
public boolean nextContour() { try { Stats.onNativeCall(); return _nNextContour(_ptr); } finally { Reference.reachabilityFence(this); } }
Move to the next contour in the path. Return true if one exists, or false if we're done with the path.
PathMeasure::nextContour
java
JetBrains/skija
shared/java/PathMeasure.java
https://github.com/JetBrains/skija/blob/master/shared/java/PathMeasure.java
Apache-2.0
public static RSXform makeFromRadians(float scale, float radians, float tx, float ty, float ax, float ay) { float s = (float) Math.sin(radians) * scale; float c = (float) Math.cos(radians) * scale; return new RSXform(c, s, tx + -c * ax + s * ay, ty + -s * ax - c * ay); }
Initialize a new xform based on the scale, rotation (in radians), final tx,ty location and anchor-point ax,ay within the src quad. Note: the anchor point is not normalized (e.g. 0...1) but is in pixels of the src image.
RSXform::makeFromRadians
java
JetBrains/skija
shared/java/RSXform.java
https://github.com/JetBrains/skija/blob/master/shared/java/RSXform.java
Apache-2.0
public static Data makeFromFileName(String path) { Stats.onNativeCall(); return new Data(_nMakeFromFileName(path)); }
Create a new dataref the file with the specified path. If the file cannot be opened, this returns null.
Data::makeFromFileName
java
JetBrains/skija
shared/java/Data.java
https://github.com/JetBrains/skija/blob/master/shared/java/Data.java
Apache-2.0
public Data makeSubset(long offset, long length) { try { Stats.onNativeCall(); return new Data(_nMakeSubset(_ptr, offset, length)); } finally { Reference.reachabilityFence(this); } }
Create a new dataref using a subset of the data in the specified src dataref.
Data::makeSubset
java
JetBrains/skija
shared/java/Data.java
https://github.com/JetBrains/skija/blob/master/shared/java/Data.java
Apache-2.0
public static Data makeEmpty() { Stats.onNativeCall(); return new Data(_nMakeEmpty()); }
Returns a new empty dataref (or a reference to a shared empty dataref). New or shared, the caller must see that {@link #close()} is eventually called.
Data::makeEmpty
java
JetBrains/skija
shared/java/Data.java
https://github.com/JetBrains/skija/blob/master/shared/java/Data.java
Apache-2.0
public Picture playback(Canvas canvas) { return playback(canvas, null); }
<p>Replays the drawing commands on the specified canvas. In the case that the commands are recorded, each command in the Picture is sent separately to canvas.</p> <p>To add a single command to draw Picture to recording canvas, call {@link Canvas#drawPicture} instead.</p> @param canvas receiver of drawing commands @return this @see <a href="https://fiddle.skia.org/c/@Picture_playback">https://fiddle.skia.org/c/@Picture_playback</a>
Picture::playback
java
JetBrains/skija
shared/java/Picture.java
https://github.com/JetBrains/skija/blob/master/shared/java/Picture.java
Apache-2.0
public Picture playback(Canvas canvas, @Nullable BooleanSupplier abort) { try { Stats.onNativeCall(); _nPlayback(_ptr, Native.getPtr(canvas), abort); return this; } finally { Reference.reachabilityFence(canvas); } }
<p>Replays the drawing commands on the specified canvas. In the case that the commands are recorded, each command in the Picture is sent separately to canvas.</p> <p>To add a single command to draw Picture to recording canvas, call {@link Canvas#drawPicture} instead.</p> @param canvas receiver of drawing commands @param abort return true to interrupt the playback @return this @see <a href="https://fiddle.skia.org/c/@Picture_playback">https://fiddle.skia.org/c/@Picture_playback</a>
Picture::playback
java
JetBrains/skija
shared/java/Picture.java
https://github.com/JetBrains/skija/blob/master/shared/java/Picture.java
Apache-2.0
public Rect getCullRect() { try { Stats.onNativeCall(); return _nGetCullRect(_ptr); } finally { Reference.reachabilityFence(this); } }
<p>Returns cull Rect for this picture, passed in when Picture was created. Returned Rect does not specify clipping Rect for Picture; cull is hint of Picture bounds.</p> <p>Picture is free to discard recorded drawing commands that fall outside cull.</p> @return bounds passed when Picture was created @see <a href="https://fiddle.skia.org/c/@Picture_cullRect">https://fiddle.skia.org/c/@Picture_cullRect</a>
Picture::getCullRect
java
JetBrains/skija
shared/java/Picture.java
https://github.com/JetBrains/skija/blob/master/shared/java/Picture.java
Apache-2.0
public int getUniqueId() { try { Stats.onNativeCall(); return _nGetUniqueId(_ptr); } finally { Reference.reachabilityFence(this); } }
Returns a non-zero value unique among Picture in Skia process. @return identifier for Picture
Picture::getUniqueId
java
JetBrains/skija
shared/java/Picture.java
https://github.com/JetBrains/skija/blob/master/shared/java/Picture.java
Apache-2.0
public Data serializeToData() { try { Stats.onNativeCall(); return new Data(_nSerializeToData(_ptr)); } finally { Reference.reachabilityFence(this); } }
@return storage containing Data describing Picture. @see <a href="https://fiddle.skia.org/c/@Picture_serialize">https://fiddle.skia.org/c/@Picture_serialize</a>
Picture::serializeToData
java
JetBrains/skija
shared/java/Picture.java
https://github.com/JetBrains/skija/blob/master/shared/java/Picture.java
Apache-2.0
public static Picture makePlaceholder(@NotNull Rect cull) { Stats.onNativeCall(); return new Picture(_nMakePlaceholder(cull._left, cull._top, cull._right, cull._bottom)); }
<p>Returns a placeholder Picture. Result does not draw, and contains only cull Rect, a hint of its bounds. Result is immutable; it cannot be changed later. Result identifier is unique.</p> <p>Returned placeholder can be intercepted during playback to insert other commands into Canvas draw stream.</p> @param cull placeholder dimensions @return placeholder with unique identifier @see <a href="https://fiddle.skia.org/c/@Picture_MakePlaceholder">https://fiddle.skia.org/c/@Picture_MakePlaceholder</a>
Picture::makePlaceholder
java
JetBrains/skija
shared/java/Picture.java
https://github.com/JetBrains/skija/blob/master/shared/java/Picture.java
Apache-2.0
public int getApproximateOpCount() { try { Stats.onNativeCall(); return _nGetApproximateOpCount(_ptr); } finally { Reference.reachabilityFence(this); } }
Returns the approximate number of operations in SkPicture. Returned value may be greater or less than the number of SkCanvas calls recorded: some calls may be recorded as more than one operation, other calls may be optimized away. @return approximate operation count @see <a href="https://fiddle.skia.org/c/@Picture_approximateOpCount">https://fiddle.skia.org/c/@Picture_approximateOpCount</a>
Picture::getApproximateOpCount
java
JetBrains/skija
shared/java/Picture.java
https://github.com/JetBrains/skija/blob/master/shared/java/Picture.java
Apache-2.0
public long getApproximateBytesUsed() { try { Stats.onNativeCall(); return _nGetApproximateBytesUsed(_ptr); } finally { Reference.reachabilityFence(this); } }
Returns the approximate byte size of Picture. Does not include large objects referenced by Picture. @return approximate size @see <a href="https://fiddle.skia.org/c/@Picture_approximateBytesUsed">https://fiddle.skia.org/c/@Picture_approximateBytesUsed</a>
Picture::getApproximateBytesUsed
java
JetBrains/skija
shared/java/Picture.java
https://github.com/JetBrains/skija/blob/master/shared/java/Picture.java
Apache-2.0
public int getGenerationId() { try { Stats.onNativeCall(); return _nGetGenerationId(_ptr); } finally { Reference.reachabilityFence(this); } }
Returns a non-zero, unique value corresponding to the pixels in this pixelref. Each time the pixels are changed (and notifyPixelsChanged is called), a different generation ID will be returned.
PixelRef::getGenerationId
java
JetBrains/skija
shared/java/PixelRef.java
https://github.com/JetBrains/skija/blob/master/shared/java/PixelRef.java
Apache-2.0
public PixelRef notifyPixelsChanged() { Stats.onNativeCall(); _nNotifyPixelsChanged(_ptr); return this; }
Call this if you have changed the contents of the pixels. This will in- turn cause a different generation ID value to be returned from getGenerationID().
PixelRef::notifyPixelsChanged
java
JetBrains/skija
shared/java/PixelRef.java
https://github.com/JetBrains/skija/blob/master/shared/java/PixelRef.java
Apache-2.0
public boolean isImmutable() { try { Stats.onNativeCall(); return _nIsImmutable(_ptr); } finally { Reference.reachabilityFence(this); } }
Returns true if this pixelref is marked as immutable, meaning that the contents of its pixels will not change for the lifetime of the pixelref.
PixelRef::isImmutable
java
JetBrains/skija
shared/java/PixelRef.java
https://github.com/JetBrains/skija/blob/master/shared/java/PixelRef.java
Apache-2.0
public PixelRef setImmutable() { Stats.onNativeCall(); _nSetImmutable(_ptr); return this; }
Marks this pixelref is immutable, meaning that the contents of its pixels will not change for the lifetime of the pixelref. This state can be set on a pixelref, but it cannot be cleared once it is set.
PixelRef::setImmutable
java
JetBrains/skija
shared/java/PixelRef.java
https://github.com/JetBrains/skija/blob/master/shared/java/PixelRef.java
Apache-2.0
public Font() { this(_nMakeDefault()); Stats.onNativeCall(); }
Returns Font initialized with default values
Font::Font
java
JetBrains/skija
shared/java/Font.java
https://github.com/JetBrains/skija/blob/master/shared/java/Font.java
Apache-2.0
public Font(@Nullable Typeface typeface) { this(_nMakeTypeface(Native.getPtr(typeface))); Stats.onNativeCall(); Reference.reachabilityFence(typeface); }
Returns Font with Typeface and default size @param typeface typeface and style used to draw and measure text. Pass null for default
Font::Font
java
JetBrains/skija
shared/java/Font.java
https://github.com/JetBrains/skija/blob/master/shared/java/Font.java
Apache-2.0
public Font(@Nullable Typeface typeface, float size) { this(_nMakeTypefaceSize(Native.getPtr(typeface), size)); Stats.onNativeCall(); Reference.reachabilityFence(typeface); }
@param typeface typeface and style used to draw and measure text. Pass null for default @param size typographic size of the text
Font::Font
java
JetBrains/skija
shared/java/Font.java
https://github.com/JetBrains/skija/blob/master/shared/java/Font.java
Apache-2.0
public Font(@Nullable Typeface typeface, float size, float scaleX, float skewX) { this(_nMakeTypefaceSizeScaleSkew(Native.getPtr(typeface), size, scaleX, skewX)); Stats.onNativeCall(); Reference.reachabilityFence(typeface); }
Constructs Font with default values with Typeface and size in points, horizontal scale, and horizontal skew. Horizontal scale emulates condensed and expanded fonts. Horizontal skew emulates oblique fonts. @param typeface typeface and style used to draw and measure text. Pass null for default @param size typographic size of the text @param scaleX text horizonral scale @param skewX additional shear on x-axis relative to y-axis
Font::Font
java
JetBrains/skija
shared/java/Font.java
https://github.com/JetBrains/skija/blob/master/shared/java/Font.java
Apache-2.0
public boolean isAutoHintingForced() { try { Stats.onNativeCall(); return _nIsAutoHintingForced(_ptr); } finally { Reference.reachabilityFence(this); } }
If true, instructs the font manager to always hint glyphs. Returned value is only meaningful if platform uses FreeType as the font manager. @return true if all glyphs are hinted
Font::isAutoHintingForced
java
JetBrains/skija
shared/java/Font.java
https://github.com/JetBrains/skija/blob/master/shared/java/Font.java
Apache-2.0
public boolean areBitmapsEmbedded() { try { Stats.onNativeCall(); return _nAreBitmapsEmbedded(_ptr); } finally { Reference.reachabilityFence(this); } }
@return true if font engine may return glyphs from font bitmaps instead of from outlines
Font::areBitmapsEmbedded
java
JetBrains/skija
shared/java/Font.java
https://github.com/JetBrains/skija/blob/master/shared/java/Font.java
Apache-2.0