Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
DrawDRRectCommand Class Reference

#include <DrawCommand.h>

Inheritance diagram for DrawDRRectCommand:
DrawCommand

Public Member Functions

 DrawDRRectCommand (const SkRRect &outer, const SkRRect &inner, const SkPaint &paint)
 
void execute (SkCanvas *canvas) const override
 
bool render (SkCanvas *canvas) const override
 
void toJSON (SkJSONWriter &writer, UrlDataManager &urlDataManager) const override
 
- Public Member Functions inherited from DrawCommand
 DrawCommand (OpType opType)
 
virtual ~DrawCommand ()
 
bool isVisible () const
 
void setVisible (bool toggle)
 
virtual void execute (SkCanvas *) const =0
 
virtual bool render (SkCanvas *canvas) const
 
virtual void toJSON (SkJSONWriter &writer, UrlDataManager &urlDataManager) const
 
OpType getOpType () const
 

Additional Inherited Members

- Public Types inherited from DrawCommand
enum  OpType {
  kBeginDrawPicture_OpType , kClear_OpType , kClipPath_OpType , kClipRegion_OpType ,
  kClipRect_OpType , kClipRRect_OpType , kClipShader_OpType , kResetClip_OpType ,
  kConcat_OpType , kConcat44_OpType , kDrawAnnotation_OpType , kDrawBitmap_OpType ,
  kDrawBitmapRect_OpType , kDrawDRRect_OpType , kDrawImage_OpType , kDrawImageLattice_OpType ,
  kDrawImageRect_OpType , kDrawImageRectLayer_OpType , kDrawOval_OpType , kDrawArc_OpType ,
  kDrawPaint_OpType , kDrawPatch_OpType , kDrawPath_OpType , kDrawPoints_OpType ,
  kDrawRect_OpType , kDrawRRect_OpType , kDrawRegion_OpType , kDrawShadow_OpType ,
  kDrawTextBlob_OpType , kDrawVertices_OpType , kDrawAtlas_OpType , kDrawDrawable_OpType ,
  kDrawEdgeAAQuad_OpType , kDrawEdgeAAImageSet_OpType , kEndDrawPicture_OpType , kRestore_OpType ,
  kSave_OpType , kSaveLayer_OpType , kSetMatrix_OpType , kSetM44_OpType ,
  kLast_OpType = kSetM44_OpType
}
 
- Static Public Member Functions inherited from DrawCommand
static void WritePNG (const SkBitmap &bitmap, SkWStream &out)
 
static const char * GetCommandString (OpType type)
 
static void MakeJsonColor (SkJSONWriter &, const SkColor color)
 
static void MakeJsonColor4f (SkJSONWriter &, const SkColor4f &color)
 
static void MakeJsonPoint (SkJSONWriter &, const SkPoint &point)
 
static void MakeJsonPoint (SkJSONWriter &, SkScalar x, SkScalar y)
 
static void MakeJsonPoint3 (SkJSONWriter &, const SkPoint3 &point)
 
static void MakeJsonRect (SkJSONWriter &, const SkRect &rect)
 
static void MakeJsonIRect (SkJSONWriter &, const SkIRect &)
 
static void MakeJsonMatrix (SkJSONWriter &, const SkMatrix &)
 
static void MakeJsonMatrix44 (SkJSONWriter &, const SkM44 &)
 
static void MakeJsonPath (SkJSONWriter &, const SkPath &path)
 
static void MakeJsonRegion (SkJSONWriter &, const SkRegion &region)
 
static void MakeJsonSampling (SkJSONWriter &, const SkSamplingOptions &sampling)
 
static void MakeJsonPaint (SkJSONWriter &, const SkPaint &paint, UrlDataManager &urlDataManager)
 
static void MakeJsonLattice (SkJSONWriter &, const SkCanvas::Lattice &lattice)
 
static void flatten (const SkFlattenable *flattenable, SkJSONWriter &writer, UrlDataManager &urlDataManager)
 
static bool flatten (const SkImage &image, SkJSONWriter &writer, UrlDataManager &urlDataManager)
 
static bool flatten (const SkBitmap &bitmap, SkJSONWriter &writer, UrlDataManager &urlDataManager)
 
- Static Public Attributes inherited from DrawCommand
static const int kOpTypeCount = kLast_OpType + 1
 

Detailed Description

Definition at line 584 of file DrawCommand.h.

Constructor & Destructor Documentation

◆ DrawDRRectCommand()

DrawDRRectCommand::DrawDRRectCommand ( const SkRRect outer,
const SkRRect inner,
const SkPaint paint 
)

Definition at line 1845 of file DrawCommand.cpp.

1848 : INHERITED(kDrawDRRect_OpType) {
1849 fOuter = outer;
1850 fInner = inner;
1851 fPaint = paint;
1852}
@ kDrawDRRect_OpType
Definition: DrawCommand.h:69
const Paint & paint
Definition: color_source.cc:38

Member Function Documentation

◆ execute()

void DrawDRRectCommand::execute ( SkCanvas canvas) const
overridevirtual

Implements DrawCommand.

Definition at line 1854 of file DrawCommand.cpp.

1854 {
1855 canvas->drawDRRect(fOuter, fInner, fPaint);
1856}
void drawDRRect(const SkRRect &outer, const SkRRect &inner, const SkPaint &paint)
Definition: SkCanvas.cpp:1645

◆ render()

bool DrawDRRectCommand::render ( SkCanvas canvas) const
overridevirtual

Reimplemented from DrawCommand.

Definition at line 1858 of file DrawCommand.cpp.

1858 {
1859 render_drrect(canvas, fOuter, fInner);
1860 return true;
1861}

◆ toJSON()

void DrawDRRectCommand::toJSON ( SkJSONWriter writer,
UrlDataManager urlDataManager 
) const
overridevirtual

Reimplemented from DrawCommand.

Definition at line 1863 of file DrawCommand.cpp.

1863 {
1864 INHERITED::toJSON(writer, urlDataManager);
1866 make_json_rrect(writer, fOuter);
1868 make_json_rrect(writer, fInner);
1870 MakeJsonPaint(writer, fPaint, urlDataManager);
1871}
static void make_json_rrect(SkJSONWriter &writer, const SkRRect &rrect)
#define DEBUGCANVAS_ATTRIBUTE_INNER
Definition: DrawCommand.cpp:75
#define DEBUGCANVAS_ATTRIBUTE_OUTER
Definition: DrawCommand.cpp:74
#define DEBUGCANVAS_ATTRIBUTE_PAINT
Definition: DrawCommand.cpp:73
static void MakeJsonPaint(SkJSONWriter &, const SkPaint &paint, UrlDataManager &urlDataManager)
virtual void toJSON(SkJSONWriter &writer, UrlDataManager &urlDataManager) const
void appendName(const char *name)
Definition: SkJSONWriter.h:90

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