Skia
2D Graphics Library
SkSize Struct Reference

#include <SkSize.h>

Public Member Functions

void set (SkScalar w, SkScalar h)
 
bool isZero () const
 Returns true iff fWidth == 0 && fHeight == 0. More...
 
bool isEmpty () const
 Returns true if either width or height are <= 0. More...
 
void setEmpty ()
 Set the width and height to 0. More...
 
SkScalar width () const
 
SkScalar height () const
 
bool equals (SkScalar w, SkScalar h) const
 
SkISize toRound () const
 
SkISize toCeil () const
 
SkISize toFloor () const
 

Static Public Member Functions

static constexpr SkSize Make (SkScalar w, SkScalar h)
 
static constexpr SkSize Make (const SkISize &src)
 
static constexpr SkSize MakeEmpty ()
 

Public Attributes

SkScalar fWidth
 
SkScalar fHeight
 

Member Function Documentation

◆ equals()

bool SkSize::equals ( SkScalar  w,
SkScalar  h 
) const
inline

◆ height()

SkScalar SkSize::height ( ) const
inline

◆ isEmpty()

bool SkSize::isEmpty ( ) const
inline

Returns true if either width or height are <= 0.

◆ isZero()

bool SkSize::isZero ( ) const
inline

Returns true iff fWidth == 0 && fHeight == 0.

◆ Make() [1/2]

static constexpr SkSize SkSize::Make ( const SkISize src)
inlinestaticconstexpr

◆ Make() [2/2]

static constexpr SkSize SkSize::Make ( SkScalar  w,
SkScalar  h 
)
inlinestaticconstexpr

◆ MakeEmpty()

static constexpr SkSize SkSize::MakeEmpty ( )
inlinestaticconstexpr

◆ set()

void SkSize::set ( SkScalar  w,
SkScalar  h 
)
inline

◆ setEmpty()

void SkSize::setEmpty ( )
inline

Set the width and height to 0.

◆ toCeil()

SkISize SkSize::toCeil ( ) const
inline

◆ toFloor()

SkISize SkSize::toFloor ( ) const
inline

◆ toRound()

SkISize SkSize::toRound ( ) const
inline

◆ width()

SkScalar SkSize::width ( ) const
inline

Member Data Documentation

◆ fHeight

SkScalar SkSize::fHeight

◆ fWidth

SkScalar SkSize::fWidth

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