![]() ![]() ![]()
|
SophiaFramework 2.1 |
#include <SFUGraphics.hpp>
class SFUGraphics : public SFAException;
typedef SFUGraphics& SFUGraphicsRef; typedef SFUGraphics* SFUGraphicsPtr; typedef SFUGraphics** SFUGraphicsHandle; typedef const SFUGraphics ConstSFUGraphics; typedef const SFUGraphics& ConstSFUGraphicsRef; typedef const SFUGraphics* ConstSFUGraphicsPtr; typedef const SFUGraphics** ConstSFUGraphicsHandle;
このクラスは SFBGraphics と SFBDisplay クラスを抽象化したクラスであり、 グラフィックを描画するために使用します。原点座標の移動やクリッピング、色設定 などを簡単に設定できます。このクラスは new で生成して使用することも 出来ますが、起動時に自動的に生成され SFCApplet クラスに保持されますので SFCApplet::Graphics もしくは SFUGraphics::Instance で取得したオブジェクトを 使用するほうが効率が良いです。これらのメソッドで取得したオブジェクトは 解放してはいけないことに注意してください。
![]() |
Tip |
|---|---|
また、SFBDisplay の実体は実機の実装により一つのようですので 設定した効果が上書きされる可能性があることに注意してください。 | |
| コンストラクタ/デストラクタ | ||
|---|---|---|
| public |
SFUGraphics | SFUGraphics クラスのコンストラクタです。 |
| public |
~SFUGraphics | SFUGraphics クラスのデストラクタです。 |
| パブリック関数 | ||
|---|---|---|
| public |
Backlight | デバイスのバックライトを点灯/消灯します。 |
| public |
BitBlt | ビットマップを表示領域に転送します。 |
| public |
ClearClip | クリッピングを解除します。 |
| public |
ClearRect | 長方形領域を背景色で塗りつぶしてクリアします。 |
| public |
ClearTranslate | 原点移動を解除します。 |
| public |
CloneBitmap | 現在描画対象となっているビットマップの内容を元にして 新しいビットマップを作成します。 |
| public |
CreateBitmap | デバイスビットマップと互換性のある ビットマップを作成します。 |
| public |
DetachDestination | レンダリング先ビットマップを解除し、 レンダリング先を画面ビットマップに設定します。 |
| public static |
DeviceSize | デバイスの画面サイズを取得します。 |
| public |
Display | 内部で保持している SFBDisplay インスタンスを取得します。 |
| public |
Draw3DBottom | 明るい部分と暗い部分を持つ立体的な長方形の下辺を描きます。 |
| public |
Draw3DFrame | 明るい部分と暗い部分を持つ立体的な長方形の枠を描きます。 |
| public |
Draw3DHorizontal | 明るい部分と暗い部分を持つ立体的な長方形 の水平方向の中央部分を描きます。 |
| public |
Draw3DLeft | 明るい部分と暗い部分を持つ立体的な長方形 の左側の端を描きます。 |
| public |
Draw3DRect | 明るい部分と暗い部分を持つ立体的な長方形を描きます。 |
| public |
Draw3DRight | 明るい部分と暗い部分を持つ立体的な長方形 の右辺を描きます。 |
| public |
Draw3DTop | 明るい部分と暗い部分を持つ立体的な長方形 の上側の端を描きます。 |
| public |
Draw3DVertical | 明るい部分と暗い部分を持つ立体的な長方形 の垂直方向の中央部分を描きます。 |
| public |
DrawArc | 円弧を描画します。 |
| public |
DrawBitmap | ビットマップを描画します。 |
| public |
DrawCircle | 円を描画します。 |
| public |
DrawEllipse | 楕円を描画します。 |
| public |
DrawEllipticalArc | 楕円弧を描画します。 |
| public |
DrawFrame | 長方形の枠を描画します。 |
| public |
DrawFrameShadow | 長方形の枠と影を描画します。 |
| public |
DrawImage | イメージを描画します。 |
| public |
DrawLine | 線を描画します。 |
| public |
DrawPie | 扇形を描画します。 |
| public |
DrawPoint | 点を描画します。 |
| public |
DrawPolygon | 多角形を描画します。 |
| public |
DrawPolyline | 多角線を描画します。 |
| public |
DrawRect | 長方形を描画します。 |
| public |
DrawRoundRectangle | 角の丸い長方形を描画します。 |
| public |
DrawString | 文字列を自動折り返しで指定された長方形の中に描画します。 |
| public |
DrawText | 文字列を描画します。 |
| public |
DrawTriangle | 三角形を描画します。 |
| public |
Exception (SFAException から継承) | エラーコードを取得/設定します。 |
| public |
GetBackground | 背景色を取得します。 |
| public |
GetClip | クリッピング領域を取得します。 |
| public |
GetColor | 前景色を取得します。 |
| public |
GetColorDepth | デバイスの色深度を取得します。 |
| public |
GetDestination | レンダリング先のビットマップを取得します。 |
| public |
GetDeviceBitmap | デバイス(画面)ビットマップを取得します。 |
| public |
GetFillColor | 塗りつぶし色を取得します。 |
| public |
GetFillMode | 振りつぶしモードを取得します。 |
| public |
GetFont | 設定されているフォントを取得します。 |
| public |
GetFontAscent | フォントのアセントを取得します。 |
| public |
GetFontDescent | フォントのディセントを取得します。 |
| public |
GetFontHeight | フォントの高さを取得します。 |
| public |
GetPaintMode | 現在の描画モードを取得します。 |
| public |
GetPointSize | 現在のポイントサイズのピクセル数を取得します。 |
| public |
GetStrokeStyle | ストロークスタイルを取得します。 |
| public |
GetSymbol | 指定された記号に対応する文字を返します。 |
| public |
GetTranslate | 原点移動の移動量を取得します。 |
| public |
Graphics | 内部で保持している SFBGraphics インスタンスを取得します。 |
| public static |
Instance | 起動時に自動生成されたインスタンスを取得します。 |
| public |
MeasureText | 指定されたテキスト文字列を描画した場合の幅を測定します。 |
| public |
MeasureTextEx | 指定されたテキスト文字列を描画した場合の幅を測定します。 |
| public |
SetAnnunciators | 指定されたアナンシエータをオンまたはオフにします。 この関数のサポートと動作は、特定のデバイスに完全に依存します。 |
| public |
SetBackground | 背景色を設定します。 |
| public |
SetClip | クリッピング領域を設定します。 |
| public |
SetColor | 前景色を設定します。 |
| public |
SetDestination | レンダリング先のビットマップを設定します。 |
| public |
SetFillColor | 塗りつぶし色を設定します。 |
| public |
SetFillMode | 塗りつぶしモードを設定します。 |
| public |
SetFont | フォントを設定します。 |
| public |
SetPaintMode | 現在の描画モードを設定します。 |
| public |
SetPointSize | ポイントのサイズ(幅)のピクセル数を設定します。 |
| public |
SetStrokeStyle | ストローク スタイルを設定します。 |
| public |
SetTranslate | 原点移動の移動量を設定します。 |
| public |
Update | 描画操作を行った後、変更を表示ハードウェアに 通知するために呼び出します。 |
| プロテクト関数 | ||
|---|---|---|
| public |
Exception (SFAException から継承) | エラーコードを取得/設定します。 |
| 型 | ||
|---|---|---|
| NO_ERROR (SFAException から継承) | エラーがないことを表す定数です。 | |
[ public ] SFUGraphics(Void);
内部で SFBGraphics と SFBDisplay のインスタンスを生成し、 フォントを AEE_FONT_NORMAL に設定して終了します。
[ public ] ~SFUGraphics(Void);
内部で保持している SFBGraphics と SFBDisplay のオブジェクトを 解放します。
[ public ] Void BitBlt( ConstSFURectRef rcDest // 描画先の矩形座標 SFUBrewPtr<SFBBitmap>::ConstRef pbmSource // 描画元の画像ソース ConstSFUPointRef ptSrc // 描画元の画像ソース内での転送開始座標 AEERasterOp rop = AEE_RO_COPY // 転送モード );
[ public ] Void ClearClip(Void);
[ public ] Void ClearRect( ConstSFURectRef rect // 領域 );
[ public ] Void ClearTranslate(Void);
[ public, const ] SFUBrewPtr<SFBBitmap> CloneBitmap( ConstSFURectRef rcSrc // コピー元となる矩形座標 );
[ public, const ] SFUBrewPtr<SFBBitmap> CreateBitmap( ConstSFUSizeRef size // 新しいビットマップのサイズ );
[ public ] Void DetachDestination(Void);
[ public, static ] SFUSize DeviceSize(Void);
[ public, const ] SFUBrewPtr<SFBDisplay> Display(Void);
高速な処理を記述したい場合などに内部で保持されている SFBDisplay を取得することが出来ます。
![]() |
Tip |
|---|---|
ダイレクトにアクセスされた処理内容について、SFUGraphics は認識する手段がありませんので描画の整合性が取れなくなることが あることに注意してください。現在のバージョンでは環境の退避・復帰 をするためのメソッドは用意されていません。 | |
[ public ] Void Draw3DBottom( ConstSFURectRef rect // 描画する長方形 ConstSFUColor3DRef color // ベース・ライト・シャドーを表すカラー );
[ public ] Void Draw3DFrame( ConstSFURectRef rect // 描画する長方形 ConstSFUColor3DRef color // ベース・ライト・シャドーを表すカラー );
[ public ] Void Draw3DHorizontal( ConstSFURectRef rect // 描画する長方形 ConstSFUColor3DRef color // ベース・ライト・シャドーを表すカラー );
[ public ] Void Draw3DLeft( ConstSFURectRef rect // 描画する長方形 ConstSFUColor3DRef color // ベース・ライト・シャドーを表すカラー );
[ public ] Void Draw3DRect( ConstSFURectRef rect // 描画する長方形 ConstSFUColor3DRef color // ベース・ライト・シャドーを表すカラー );
[ public ] Void Draw3DRight( ConstSFURectRef rect // 描画する長方形 ConstSFUColor3DRef color // ベース・ライト・シャドーを表すカラー );
[ public ] Void Draw3DTop( ConstSFURectRef rect // 描画する長方形 ConstSFUColor3DRef color // ベース・ライト・シャドーを表すカラー );
[ public ] Void Draw3DVertical( ConstSFURectRef rect // 描画する長方形 ConstSFUColor3DRef color // ベース・ライト・シャドーを表すカラー );
[ public ] Void DrawArc( ConstSFUArcRef arc // 描画する円弧 );
[ public ] Void DrawBitmap( SFUBrewPtr<SFBBitmap>::ConstRef srcBmp // 描画元ビットマップ ConstSFUPointRef destPt // 描画先座標 AEERasterOp op = AEE_RO_COPY // 転送モード );
[ public ] Void DrawCircle( ConstSFUCircleRef circle // 描画する円 );
[ public ] Void DrawEllipse( ConstSFUEllipseRef ellipse // 描画する楕円 );
[ public ] Void DrawEllipticalArc( ConstSFURectRef rect // 楕円の外接長方形 SInt16 startAngle // 弧の開始角度 (度単位) SInt16 arcAngle // 弧の範囲角度 (度単位) );
[ public ] Void DrawFrame( ConstSFURectRef rect // 描画する長方形 ConstSFUColorRef color // 描画するカラー );
[ public ] Void DrawFrameShadow( ConstSFURectRef rect // 描画する長方形の内側の長方形 ConstSFUShadow3DRef color // 枠と影のカラー );
指定された長方形領域の外側に枠と影を 指定された色で描画します。
[ public, const ] Void DrawImage( SFUBrewPtr<SFBImage>::ConstRef srcImg // 描画元イメージ ConstSFUPointRef destPt // 描画先座標 );
[ public ] Void DrawLine( ConstSFULineRef line // 描画する線 );
[ public ] Void DrawPie( ConstSFUPieRef pie // 描画する扇形 );
[ public ] Void DrawPoint( ConstSFUPointRef point // 描画する点 );
[ public ] Void DrawPolygon( ConstSFUPolygonRef polygon // 描画する多角形 );
[ public ] Void DrawPolyline( ConstSFUPolylineRef polyline // 描画する多角線 );
[ public ] Void DrawRect( ConstSFURectRef rect // 描画する長方形 );
[ public ] Void DrawRect( ConstSFURectRef rect // 描画する長方形 ConstSFUColorRef color // 塗りつぶすカラー );
長方形を指定した場合は、長方形の枠を前景色で描画し、 長方形の中身を塗りつぶすかどうかは塗りつぶしモード (FillMode()) により変化します。
長方形とカラーを指定した場合は、 そのカラーで枠が描画され、中身も塗りつぶされます。
[ public ] Void DrawRoundRectangle( ConstSFURectRef rect // 外接する長方形 ConstSFUSizeRef arcSize // 角の楕円の幅と高さ );
[ public ] Void DrawString( ConstSFUWideStringRef pcText // 描画文字列 ConstSFURectRef rect // 領域 UInt32 align = IDF_ALIGN_NONE // 行中の文字列のアラインメント );
文字列を自動折り返しで描画します。 行中の文字列のアラインメントも指定できます。 IDF_ALIGN_LEFT, IDF_ALIGN_MIDDLE, IDF_ALIGN_RIGHT が 指定できます。
[ public ] Void DrawText( ConstSFUWideStringRef pcText // 描画文字列 SIntN nChars // 文字数 ConstSFUPointPtr pt // 描画座標 ConstSFURectPtr rect // 描画範囲の長方形 UInt32 align = IDF_ALIGN_NONE // アラインメント );
[ public ] Void DrawText( ConstSFUWideStringRef pcText // 描画文字列 SIntN nChars // 文字数 ConstSFUPointRef pt // 描画座標 ConstSFURectRef rect // 描画範囲の長方形 UInt32 align = IDF_ALIGN_NONE // アラインメント );
[ public ] Void DrawText( ConstSFUWideStringRef pcText // 描画文字列 SIntN nChars // 文字数 ConstSFUPointRef pt // 描画座標 UInt32 align = IDF_ALIGN_NONE // アラインメント );
[ public ] Void DrawText( ConstSFUWideStringRef pcText // 描画文字列 SIntN nChars // 文字数 ConstSFURectRef rect // 描画範囲の長方形 UInt32 align = IDF_ALIGN_NONE // アラインメント );
[ public ] Void DrawText( ConstSFUWideStringRef pcText // 描画文字列 ConstSFUPointRef pt // 描画座標 ConstSFURectRef rect // 描画範囲の長方形 UInt32 align = IDF_ALIGN_NONE // アラインメント );
[ public ] Void DrawText( ConstSFUWideStringRef pcText // 描画文字列 ConstSFUPointRef pt // 描画座標 UInt32 align = IDF_ALIGN_NONE // アラインメント );
[ public ] Void DrawText( ConstSFUWideStringRef pcText // 描画文字列 ConstSFURectRef rect // 描画範囲の長方形 UInt32 align = IDF_ALIGN_NONE // アラインメント );
[ public ] Void DrawTriangle( ConstSFUTriangleRef tri // 描画する三角形 );
[ public ] Void GetBackground( SFUColorPtr pColor );
[ public ] SFUColor GetBackground(Void);
[ public, const ] Void GetClip( SFURectPtr pRect );
[ public, const ] SFURect GetClip(Void);
[ public ] Void GetColor( SFUColorPtr pColor );
[ public ] SFUColor GetColor(Void);
[ public ] UInt08 GetColorDepth(Void);
[ public, const ] SFUBrewPtr<SFBBitmap> GetDestination(Void);
[ public, const ] SFUBrewPtr<SFBBitmap> GetDeviceBitmap(Void);
[ public ] Void GetFillColor( SFUColorPtr pColor );
[ public ] SFUColor GetFillColor(Void);
[ public ] Bool GetFillMode(Void);
[ public, const ] AEEFont GetFont(Void);
[ public, const ] SIntN GetFontAscent(Void);
[ public, static ] SIntN GetFontAscent( AEEFont font // フォントの種類 );
[ public, const ] SIntN GetFontDescent(Void);
[ public, static ] SIntN GetFontDescent( AEEFont font // フォントの種類 );
[ public, const ] SIntN GetFontHeight(Void);
[ public, static ] SIntN GetFontHeight( AEEFont font // フォントの種類 );
[ public ] AEEPaintMode GetPaintMode(Void);
[ public ] UInt08 GetPointSize(Void);
[ public ] AEEStrokeStyle GetStrokeStyle(Void);
AEEStrokeStyle | SFUGraphics::SetStrokeStyle
[ public ] WChar GetSymbol( AEESymbol symbol // 記号 );
[ public, static ] WChar GetSymbol( AEEFont font // フォントの種類 AEESymbol symbol // 記号 );
[ public, const ] SFUPoint GetTranslate(Void);
[ public, const ] SFUBrewPtr<SFBGraphics> Graphics(Void);
高速な処理を記述したい場合などに内部で保持されている SFBGraphics を取得することが出来ます。
![]() |
Tip |
|---|---|
ダイレクトにアクセスされた処理内容について、SFUGraphics は 認識する手段が有りませんので描画の整合性が取れなくなることが あることに注意してください。現在のバージョンでは環境の退避・復帰 をするためのメソッドは用意されていません。 | |
[ public, static ] SFUGraphicsPtr Instance(Void);
[ public ] SIntN MeasureText( ConstSFUWideStringRef pcText // 描画文字列 );
[ public, static ] SIntN MeasureText( AEEFont font // フォントの種類 ConstSFUWideStringRef pcText // 描画文字列 );
[ public ] SIntN MeasureTextEx( ConstSFUWideStringRef pcText // 描画文字列 SIntN nChars // 文字数 SIntN nMaxWidth // 最大幅 SIntNPtr pnFits // 描画可能最大文字数 );
[ public ] SIntN MeasureTextEx( ConstSFUWideStringRef pcText // 描画文字列 SIntN nMaxWidth // 最大幅 SIntNPtr pnFits // 描画可能最大文字数 );
[ public, static ] SIntN MeasureTextEx( AEEFont font // フォントの種類 ConstSFUWideStringRef pcText // 描画文字列 SIntN nChars // 文字数 SIntN nMaxWidth // 最大幅 SIntNPtr pnFits // 描画可能最大文字数 );
[ public, static ] SIntN MeasureTextEx( AEEFont font // フォントの種類 ConstSFUWideStringRef pcText // 描画文字列 SIntN nMaxWidth // 最大幅 SIntNPtr pnFits // 描画可能最大文字数 );
[ public ] Void SetBackground( ConstSFUColorRef color // 設定する背景色 );
[ public ] Void SetClip( ConstSFURectRef rect // クリッピング領域に設定する長方形 );
[ public ] Void SetColor( ConstSFUColorRef color // 設定する前景色 );
[ public ] SFCError SetDestination( SFUBrewPtr<SFBBitmap>::ConstRef pBitmap // 設定するビットマップ );
[ public ] Void SetFillColor( ConstSFUColorRef color // 設定する塗りつぶし色 );
[ public ] AEEPaintMode SetPaintMode( AEEPaintMode mode // 設定する描画モード );
[ public ]
AEEStrokeStyle SetStrokeStyle(
AEEStrokeStyle strokeStyle // 設定するストローク スタイル
);[ public ] Void SetTranslate( ConstSFUPointRef pt // 移動量 );
[ public ] Void Update(Void);
| Copyright(C) 2003 Sophia Cradle Inc., All Rights Reserved. |
![]() ![]() ![]()
|