Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
sk_fontations::PathGeometrySink Class Reference

#include <SkTypeface_fontations_priv.h>

Inheritance diagram for sk_fontations::PathGeometrySink:
fontations_ffi::PathWrapper

Public Member Functions

void move_to (float x, float y) override
 
void line_to (float x, float y) override
 
void quad_to (float cx0, float cy0, float x, float y) override
 
void curve_to (float cx0, float cy0, float cx1, float cy1, float x, float y) override
 
void close () override
 
SkPath into_inner () &&
 
- Public Member Functions inherited from fontations_ffi::PathWrapper
virtual ~PathWrapper ()=default
 

Detailed Description

Implementation of PathWrapper FFI C++ interface which allows Rust to call back into C++ without exposing Skia types on the interface, see skpath_bridge.h.

Definition at line 30 of file SkTypeface_fontations_priv.h.

Member Function Documentation

◆ close()

void sk_fontations::PathGeometrySink::close ( )
overridevirtual

Implements fontations_ffi::PathWrapper.

Definition at line 228 of file SkTypeface_fontations.cpp.

228{ fPath.close(); }
SkPath & close()
Definition SkPath.cpp:813

◆ curve_to()

void sk_fontations::PathGeometrySink::curve_to ( float  cx0,
float  cy0,
float  cx1,
float  cy1,
float  x,
float  y 
)
overridevirtual

Implements fontations_ffi::PathWrapper.

Definition at line 218 of file SkTypeface_fontations.cpp.

218 {
222 if (current_is_not(pt0) || current_is_not(pt1) || current_is_not(pt2)) {
223 going_to(pt2);
224 fPath.cubicTo(pt0, pt1, pt2);
225 }
226}
#define SkFloatToScalar(x)
Definition SkScalar.h:62
SkPath & cubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar x3, SkScalar y3)
Definition SkPath.cpp:789
double y
double x
static constexpr SkPoint Make(float x, float y)

◆ into_inner()

SkPath sk_fontations::PathGeometrySink::into_inner ( ) &&

Definition at line 230 of file SkTypeface_fontations.cpp.

230{ return std::move(fPath); }

◆ line_to()

void sk_fontations::PathGeometrySink::line_to ( float  x,
float  y 
)
overridevirtual

Implements fontations_ffi::PathWrapper.

Definition at line 202 of file SkTypeface_fontations.cpp.

202 {
204 if (current_is_not(pt0)) {
205 going_to(pt0);
206 fPath.lineTo(pt0);
207 }
208}
SkPath & lineTo(SkScalar x, SkScalar y)
Definition SkPath.cpp:718

◆ move_to()

void sk_fontations::PathGeometrySink::move_to ( float  x,
float  y 
)
overridevirtual

Implements fontations_ffi::PathWrapper.

Definition at line 194 of file SkTypeface_fontations.cpp.

194 {
195 if (fStarted) {
196 fPath.close();
197 fStarted = false;
198 }
200}

◆ quad_to()

void sk_fontations::PathGeometrySink::quad_to ( float  cx0,
float  cy0,
float  x,
float  y 
)
overridevirtual

Implements fontations_ffi::PathWrapper.

Definition at line 210 of file SkTypeface_fontations.cpp.

210 {
213 if (current_is_not(pt0) || current_is_not(pt1)) {
214 going_to(pt1);
215 fPath.quadTo(pt0, pt1);
216 }
217}
SkPath & quadTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2)
Definition SkPath.cpp:736

The documentation for this class was generated from the following files: