Flutter Engine
The Flutter Engine
Public Member Functions | Protected Attributes | List of all members
GraphicsPort Class Reference
Inheritance diagram for GraphicsPort:
SkiaGraphicsPort

Public Member Functions

 GraphicsPort (SkCanvas *canvas)
 
virtual ~GraphicsPort ()
 
void save ()
 
void saveLayer (const SkRect &bounds, SkAlpha alpha)
 
void restore ()
 
void translate (float x, float y)
 
void scale (float s)
 
void clip (const SkRect &r)
 
void drawOval (const SkRect &r, SkColor c)
 
virtual void drawRect (const SkRect &r, SkColor c)
 
SkCanvaspeekCanvas () const
 

Protected Attributes

SkCanvasfCanvas
 

Detailed Description

Definition at line 16 of file rasterhandleallocator.cpp.

Constructor & Destructor Documentation

◆ GraphicsPort()

GraphicsPort::GraphicsPort ( SkCanvas canvas)
inline

Definition at line 21 of file rasterhandleallocator.cpp.

21: fCanvas(canvas) {}

◆ ~GraphicsPort()

virtual GraphicsPort::~GraphicsPort ( )
inlinevirtual

Definition at line 22 of file rasterhandleallocator.cpp.

22{}

Member Function Documentation

◆ clip()

void GraphicsPort::clip ( const SkRect r)
inline

Definition at line 32 of file rasterhandleallocator.cpp.

32{ fCanvas->clipRect(r); }
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
Definition: SkCanvas.cpp:1361

◆ drawOval()

void GraphicsPort::drawOval ( const SkRect r,
SkColor  c 
)
inline

Definition at line 34 of file rasterhandleallocator.cpp.

34 {
35 SkPaint p;
36 p.setColor(c);
37 fCanvas->drawOval(r, p);
38 }
void drawOval(const SkRect &oval, const SkPaint &paint)
Definition: SkCanvas.cpp:1698

◆ drawRect()

virtual void GraphicsPort::drawRect ( const SkRect r,
SkColor  c 
)
inlinevirtual

Reimplemented in SkiaGraphicsPort.

Definition at line 40 of file rasterhandleallocator.cpp.

40 {
41 SkPaint p;
42 p.setColor(c);
43 fCanvas->drawRect(r, p);
44 }
void drawRect(const SkRect &rect, const SkPaint &paint)
Definition: SkCanvas.cpp:1673

◆ peekCanvas()

SkCanvas * GraphicsPort::peekCanvas ( ) const
inline

Definition at line 46 of file rasterhandleallocator.cpp.

46{ return fCanvas; }

◆ restore()

void GraphicsPort::restore ( )
inline

Definition at line 28 of file rasterhandleallocator.cpp.

28{ fCanvas->restore(); }
void restore()
Definition: SkCanvas.cpp:461

◆ save()

void GraphicsPort::save ( )
inline

Definition at line 24 of file rasterhandleallocator.cpp.

24{ fCanvas->save(); }
int save()
Definition: SkCanvas.cpp:447

◆ saveLayer()

void GraphicsPort::saveLayer ( const SkRect bounds,
SkAlpha  alpha 
)
inline

Definition at line 25 of file rasterhandleallocator.cpp.

25 {
27 }
int saveLayerAlpha(const SkRect *bounds, U8CPU alpha)
Definition: SkCanvas.h:661
Optional< SkRect > bounds
Definition: SkRecords.h:189

◆ scale()

void GraphicsPort::scale ( float  s)
inline

Definition at line 31 of file rasterhandleallocator.cpp.

31{ fCanvas->scale(s, s); }
void scale(SkScalar sx, SkScalar sy)
Definition: SkCanvas.cpp:1289
struct MyStruct s

◆ translate()

void GraphicsPort::translate ( float  x,
float  y 
)
inline

Definition at line 30 of file rasterhandleallocator.cpp.

30{ fCanvas->translate(x, y); }
void translate(SkScalar dx, SkScalar dy)
Definition: SkCanvas.cpp:1278
double y
double x

Member Data Documentation

◆ fCanvas

SkCanvas* GraphicsPort::fCanvas
protected

Definition at line 18 of file rasterhandleallocator.cpp.


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