Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
SkArc Struct Reference

#include <SkArc.h>

Public Types

enum class  Type : bool { kArc , kWedge }
 

Public Member Functions

 SkArc ()=default
 
 SkArc (const SkArc &arc)=default
 
SkArcoperator= (const SkArc &arc)=default
 
const SkRectoval () const
 
SkScalar startAngle () const
 
SkScalar sweepAngle () const
 
bool isWedge () const
 

Static Public Member Functions

static SkArc Make (const SkRect &oval, SkScalar startAngleDegrees, SkScalar sweepAngleDegrees, Type type)
 
static SkArc Make (const SkRect &oval, SkScalar startAngleDegrees, SkScalar sweepAngleDegrees, bool useCenter)
 

Public Attributes

SkRect fOval = SkRect::MakeEmpty()
 
SkScalar fStartAngle = 0
 
SkScalar fSweepAngle = 0
 
Type fType = Type::kArc
 

Friends

bool operator== (const SkArc &a, const SkArc &b)
 
bool operator!= (const SkArc &a, const SkArc &b)
 

Detailed Description

Definition at line 15 of file SkArc.h.

Member Enumeration Documentation

◆ Type

enum class SkArc::Type : bool
strong
Enumerator
kArc 
kWedge 

Definition at line 16 of file SkArc.h.

16 : bool {
17 kArc, // An arc along the perimeter of the oval
18 kWedge // A closed wedge that includes the oval's center
19 };

Constructor & Destructor Documentation

◆ SkArc() [1/2]

SkArc::SkArc ( )
default

◆ SkArc() [2/2]

SkArc::SkArc ( const SkArc arc)
default

Member Function Documentation

◆ isWedge()

bool SkArc::isWedge ( ) const
inline

Definition at line 28 of file SkArc.h.

28{ return fType == Type::kWedge; }
Type fType
Definition: SkArc.h:62

◆ Make() [1/2]

static SkArc SkArc::Make ( const SkRect oval,
SkScalar  startAngleDegrees,
SkScalar  sweepAngleDegrees,
bool  useCenter 
)
inlinestatic

Definition at line 46 of file SkArc.h.

49 {
50 return SkArc(
51 oval, startAngleDegrees, sweepAngleDegrees, useCenter ? Type::kWedge : Type::kArc);
52 }
const SkRect & oval() const
Definition: SkArc.h:25
SkArc()=default

◆ Make() [2/2]

static SkArc SkArc::Make ( const SkRect oval,
SkScalar  startAngleDegrees,
SkScalar  sweepAngleDegrees,
Type  type 
)
inlinestatic

Definition at line 38 of file SkArc.h.

41 {
42 return SkArc(oval, startAngleDegrees, sweepAngleDegrees, type);
43 }
GLenum type

◆ operator=()

SkArc & SkArc::operator= ( const SkArc arc)
default

◆ oval()

const SkRect & SkArc::oval ( ) const
inline

Definition at line 25 of file SkArc.h.

25{ return fOval; }
SkRect fOval
Definition: SkArc.h:55

◆ startAngle()

SkScalar SkArc::startAngle ( ) const
inline

Definition at line 26 of file SkArc.h.

26{ return fStartAngle; }
SkScalar fStartAngle
Definition: SkArc.h:58

◆ sweepAngle()

SkScalar SkArc::sweepAngle ( ) const
inline

Definition at line 27 of file SkArc.h.

27{ return fSweepAngle; }
SkScalar fSweepAngle
Definition: SkArc.h:60

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const SkArc a,
const SkArc b 
)
friend

Definition at line 35 of file SkArc.h.

35{ return !(a == b); }
static bool b
struct MyStruct a[10]

◆ operator==

bool operator== ( const SkArc a,
const SkArc b 
)
friend

Definition at line 30 of file SkArc.h.

30 {
31 return a.fOval == b.fOval && a.fStartAngle == b.fStartAngle &&
32 a.fSweepAngle == b.fSweepAngle && a.fType == b.fType;
33 }

Member Data Documentation

◆ fOval

SkRect SkArc::fOval = SkRect::MakeEmpty()

Definition at line 55 of file SkArc.h.

◆ fStartAngle

SkScalar SkArc::fStartAngle = 0

Definition at line 58 of file SkArc.h.

◆ fSweepAngle

SkScalar SkArc::fSweepAngle = 0

Definition at line 60 of file SkArc.h.

◆ fType

Type SkArc::fType = Type::kArc

Definition at line 62 of file SkArc.h.


The documentation for this struct was generated from the following file: