icubic library reference
パスの描画
概要
サーフェスにパスを描画します

パスの描画
パスの作成
パスオブジェクトを作り三角形を設定します

//Pathオブジェクトの作成
instance<Path> path;

//三角形の設定
path->Move( fvector2( 10.0f , 10.0f ) );
path->Line( fvector2( 90.0f , 10.0f ) );
path->Line( fvector2( 50.0f , 90.0f ) );


Edgemapの作成
パスからEdgemapを作成する

//変換の種類
instance<OutlineGenPaint> gen;

//Edgemap変換オブジェクト
instance<PathToEdgemap> ptoe;

//変換する
instance<EdgemapOutline> edgemap;
ptoe->ToEdgemap
    (
    (iEdgemapOutline)edgemap ,
    (iPathLogicInfo)path ,
    faffine() ,
    (iOutlineGen)gen ,
    Winding_PathFillRule ,
    faffine() ,
    irect( 0 , 0 , 100 , 100 ) ,
    x4_antialias
    );


レンダリング
Edgemapをサーフェスにレンダリングする

//Paintオブジェクトの作成
instance<PaintSolidColor> paint;
paint->SetColor( rgba( 0 , 0 , 255 , 255 ) );

//Blender , Paintの設定
instance<RendererOutline> render;
instance<BlenderOverlap> blender;
render->SetPaint( (iPaint)paint );
render->SetBlender( (iBlender)blender );

//レンダリングの実行
render->Render
    (
    (iSurfaceDest)surface ,
    (iEdgemapOutlineInfo)edgemap ,
    &irect( 0 , 0 , 100 , 100 ) ,
    1 ,
    255
    );


出力結果
サンプルの出力結果