![]() ![]() ![]()
|
BREW C++ ライブラリ & GUI フレームワーク : SophiaFramework 3.0 |

// 三角形 // 左から x1, y1, x2, y2, x3, y3 SFXTriangle triangle(10, 40, 105, 25, 80, 95); // 三角形の描画 graphics->DrawTriangle(triangle); // 円 // 左から中心の x 座標、中心の y 座標、半径 SFXCircle circle(170, 60, 40); // 円の描画 graphics->DrawCircle(circle); // 扇形 // 左から中心の x 座標、中心の y 座標、半径、開始角度、範囲角度 SFXPie pie(80, 160, 60, 120, 60); // 扇形の描画 graphics->DrawPie(pie); // 弧 // 左から中心の x 座標、中心の y 座標、半径、開始角度、範囲角度 SFXArc arc(190, 160, 60, 120, 60); // 弧の描画 graphics->DrawArc(arc); // 楕円 // 左から中心の x 座標、中心の y 座標、左右半径、上下半径 SFXEllipse ellipse(110, 200, 100, 20); // 楕円の描画 graphics->DrawEllipse(ellipse);

多角形 (SFXPolygon) クラスは、多角形を表すクラスです。
多角形の頂点は SFXPolygon クラス内では管理していません。頂点の座標 (SFXPixel) の配列を外部で管理します。
SFXPolygon インスタンスの使用中は、その配列が破壊されないようにする必要があります。
使用法
// 多角形の頂点 SFXPixel pixel[5]; pixel[0].Set(30, 80); pixel[1].Set(35, 50); pixel[2].Set(130, 30); pixel[3].Set(180, 40); pixel[4].Set(190, 90); // 多角形の定義 (頂点の配列とサイズを指定する) SFXPolygon polygon(&pixel[0], lengthof(pixel)); // 多角形の描画 graphics->DrawPolygon(polygon);

折れ線 (SFXPolyline) クラスは、折れ線を表すクラスです。SFXPolygon クラスと同じ扱い方をします。
// 折れ線の頂点 SFXPixel pixel[5]; pixel[0].Set(30, 80); pixel[1].Set(35, 50); pixel[2].Set(130, 30); pixel[3].Set(180, 40); pixel[4].Set(190, 90); // 折れ線の定義 (頂点の配列とサイズを指定する) SFXPolyline polyline(&pixel[0], lengthof(pixel)); // 折れ線の描画 graphics->DrawPolyline(polyline);
|
Copyright (C) 2002 - 2009 Sophia Cradle, Inc. All Rights Reserved. |
![]() ![]() ![]()
|