Interface IGraphicsEx
Inherited Members
Namespace: GameCanvas
Assembly: GameCanvas.dll
Syntax
public interface IGraphicsEx : IGraphics
Properties
CanvasAABB
キャンバスのAABB
Declaration
GcAABB CanvasAABB { get; }
Property Value
Type | Description |
---|---|
GcAABB |
CanvasCenter
キャンバスの中心座標
Declaration
float2 CanvasCenter { get; }
Property Value
Type | Description |
---|---|
float2 |
CanvasHeight
キャンバスの縦幅
Declaration
int CanvasHeight { get; }
Property Value
Type | Description |
---|---|
Int32 |
CanvasResolution
キャンバスの解像度とリフレッシュレート
Declaration
GcResolution CanvasResolution { get; }
Property Value
Type | Description |
---|---|
GcResolution |
CanvasWidth
キャンバスの横幅
Declaration
int CanvasWidth { get; }
Property Value
Type | Description |
---|---|
Int32 |
ColorAqua
水色
Declaration
Color ColorAqua { get; }
Property Value
Type | Description |
---|---|
Color |
ColorBlack
黒色
Declaration
Color ColorBlack { get; }
Property Value
Type | Description |
---|---|
Color |
ColorBlue
青色
Declaration
Color ColorBlue { get; }
Property Value
Type | Description |
---|---|
Color |
ColorCyan
シアン
Declaration
Color ColorCyan { get; }
Property Value
Type | Description |
---|---|
Color |
ColorGray
灰色
Declaration
Color ColorGray { get; }
Property Value
Type | Description |
---|---|
Color |
ColorGreen
緑色
Declaration
Color ColorGreen { get; }
Property Value
Type | Description |
---|---|
Color |
ColorPurple
紫色
Declaration
Color ColorPurple { get; }
Property Value
Type | Description |
---|---|
Color |
ColorRed
赤色
Declaration
Color ColorRed { get; }
Property Value
Type | Description |
---|---|
Color |
ColorWhite
白色
Declaration
Color ColorWhite { get; }
Property Value
Type | Description |
---|---|
Color |
ColorYellow
黄色
Declaration
Color ColorYellow { get; }
Property Value
Type | Description |
---|---|
Color |
DeviceScreenHeight
端末スクリーンの縦幅
Declaration
int DeviceScreenHeight { get; }
Property Value
Type | Description |
---|---|
Int32 |
DeviceScreenWidth
端末スクリーンの横幅
Declaration
int DeviceScreenWidth { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
ChangeBorderColor(Single, Single, Single)
帯の色を変更します
Declaration
void ChangeBorderColor(in float r, in float g, in float b)
Parameters
Type | Name | Description |
---|---|---|
Single | r | 帯の色の赤成分 |
Single | g | 帯の色の緑成分 |
Single | b | 帯の色の青成分 |
ChangeCanvasSize(Int32, Int32)
キャンバス解像度を指定します
Declaration
void ChangeCanvasSize(in int width, in int height)
Parameters
Type | Name | Description |
---|---|---|
Int32 | width | 横幅 |
Int32 | height | 縦幅 |
Remarks
- 初期値は 720x1280 です
- ディスプレイ解像度と縦横比が異なる場合は、上下もしくは左右に帯がつきます
DrawCircle(Single, Single, Single)
円を線で描画します
Declaration
void DrawCircle(in float x, in float y, in float radius)
Parameters
Type | Name | Description |
---|---|---|
Single | x | 中心のX座標 |
Single | y | 中心のY座標 |
Single | radius | 半径 |
DrawCircle(float2, Single)
円を線で描画します
Declaration
void DrawCircle(in float2 position, in float radius)
Parameters
Type | Name | Description |
---|---|---|
float2 | position | 中心の座標 |
Single | radius | 半径 |
DrawImage(GcImage, Single, Single, Single)
画像を描画します
Declaration
void DrawImage(in GcImage image, in float x, in float y, float degree = 0F)
Parameters
Type | Name | Description |
---|---|---|
GcImage | image | 描画する画像 |
Single | x | X座標 |
Single | y | Y座標 |
Single | degree | 回転(度数法) |
DrawImage(GcImage, Single, Single, Single, Single, Single)
画像を拡縮して描画します
Declaration
void DrawImage(in GcImage image, in float x, in float y, in float width, in float height, float degree = 0F)
Parameters
Type | Name | Description |
---|---|---|
GcImage | image | 描画する画像 |
Single | x | X座標 |
Single | y | Y座標 |
Single | width | 横幅。画像の横幅がこれになるように拡縮される |
Single | height | 縦幅。画像の縦幅がこれになるように拡縮される |
Single | degree | 回転(度数法) |
DrawLine(Single, Single, Single, Single)
線を描画します
Declaration
void DrawLine(in float x0, in float y0, in float x1, in float y1)
Parameters
Type | Name | Description |
---|---|---|
Single | x0 | 始点のX座標 |
Single | y0 | 始点のY座標 |
Single | x1 | 終点のX座標 |
Single | y1 | 終点のY座標 |
DrawLine(float2, float2)
線を描画します
Declaration
void DrawLine(in float2 begin, in float2 end)
Parameters
Type | Name | Description |
---|---|---|
float2 | begin | 始点 |
float2 | end | 終点 |
DrawRect(Single, Single, Single, Single, Single)
矩形を線で描画します
Declaration
void DrawRect(in float x, in float y, in float width, in float height, float degree = 0F)
Parameters
Type | Name | Description |
---|---|---|
Single | x | X座標 |
Single | y | Y座標 |
Single | width | 横幅 |
Single | height | 縦幅 |
Single | degree | 回転(度数法) |
DrawRect(float2, float2, Single)
矩形を線で描画します
Declaration
void DrawRect(in float2 position, in float2 size, float degree = 0F)
Parameters
Type | Name | Description |
---|---|---|
float2 | position | 位置 |
float2 | size | 大きさ |
Single | degree | 回転(度数法) |
DrawRoundedRect(Single, Single, Single, Single, Single)
角丸矩形を線で描画します
Declaration
void DrawRoundedRect(in float x, in float y, in float width, in float height, float degree = 0F)
Parameters
Type | Name | Description |
---|---|---|
Single | x | X座標 |
Single | y | Y座標 |
Single | width | 横幅 |
Single | height | 縦幅 |
Single | degree | 回転(度数法) |
DrawRoundedRect(Single, Single, Single, Single, Single, Single)
角丸矩形を線で描画します
Declaration
void DrawRoundedRect(in float x, in float y, in float width, in float height, float cornerRadius, float degree = 0F)
Parameters
Type | Name | Description |
---|---|---|
Single | x | X座標 |
Single | y | Y座標 |
Single | width | 横幅 |
Single | height | 縦幅 |
Single | cornerRadius | 角丸の半径 |
Single | degree | 回転(度数法) |
DrawRoundedRect(float2, float2, Single)
角丸矩形を線で描画します
Declaration
void DrawRoundedRect(in float2 position, in float2 size, float degree = 0F)
Parameters
Type | Name | Description |
---|---|---|
float2 | position | 位置 |
float2 | size | 大きさ |
Single | degree | 回転(度数法) |
DrawRoundedRect(float2, float2, Single, Single)
角丸矩形を線で描画します
Declaration
void DrawRoundedRect(in float2 position, in float2 size, float cornerRadius, float degree = 0F)
Parameters
Type | Name | Description |
---|---|---|
float2 | position | 位置 |
float2 | size | 大きさ |
Single | cornerRadius | 角丸の半径 |
Single | degree | 回転(度数法) |
DrawString(String, Single, Single, Single)
文字列を描画します
Declaration
void DrawString(in string str, in float x, in float y, float degree = 0F)
Parameters
Type | Name | Description |
---|---|---|
String | str | 描画する文字列 |
Single | x | X座標 |
Single | y | Y座標 |
Single | degree | 回転(度数法) |
DrawString(String, Single, Single, Single, Single, Single)
文字列を拡縮して描画します
Declaration
void DrawString(in string str, in float x, in float y, in float width, in float height, float degree = 0F)
Parameters
Type | Name | Description |
---|---|---|
String | str | 描画する文字列 |
Single | x | X座標 |
Single | y | Y座標 |
Single | width | 横幅。文字列の横幅がこれになるように拡縮される |
Single | height | 縦幅。文字列の縦幅がこれになるように拡縮される |
Single | degree | 回転(度数法) |
DrawTexture(Texture, Single, Single, Single, Single, Single)
テクスチャーを拡縮して描画します
Declaration
void DrawTexture(in Texture texture, in float x, in float y, in float width, in float height, float degree = 0F)
Parameters
Type | Name | Description |
---|---|---|
Texture | texture | 描画するテクスチャー |
Single | x | X座標 |
Single | y | Y座標 |
Single | width | 横幅。画像の横幅がこれになるように拡縮される |
Single | height | 縦幅。画像の縦幅がこれになるように拡縮される |
Single | degree | 回転(度数法) |
FillCircle(Single, Single, Single)
円を塗りで描画します
Declaration
void FillCircle(in float x, in float y, in float radius)
Parameters
Type | Name | Description |
---|---|---|
Single | x | 中心のX座標 |
Single | y | 中心のY座標 |
Single | radius | 半径 |
FillCircle(float2, Single)
円を塗りで描画します
Declaration
void FillCircle(in float2 position, in float radius)
Parameters
Type | Name | Description |
---|---|---|
float2 | position | 中心の座標 |
Single | radius | 半径 |
FillRect(Single, Single, Single, Single, Single)
矩形を塗りで描画します
Declaration
void FillRect(in float x, in float y, in float width, in float height, float degree = 0F)
Parameters
Type | Name | Description |
---|---|---|
Single | x | X座標 |
Single | y | Y座標 |
Single | width | 横幅 |
Single | height | 縦幅 |
Single | degree | 回転(度数法) |
FillRect(float2, float2, Single)
矩形を塗りで描画します
Declaration
void FillRect(in float2 position, in float2 size, float degree = 0F)
Parameters
Type | Name | Description |
---|---|---|
float2 | position | 位置 |
float2 | size | 大きさ |
Single | degree | 回転(度数法) |
FillRoundedRect(Single, Single, Single, Single, Single)
角丸矩形を塗りで描画します
Declaration
void FillRoundedRect(in float x, in float y, in float width, in float height, float degree = 0F)
Parameters
Type | Name | Description |
---|---|---|
Single | x | X座標 |
Single | y | Y座標 |
Single | width | 横幅 |
Single | height | 縦幅 |
Single | degree | 回転(度数法) |
FillRoundedRect(Single, Single, Single, Single, Single, Single)
角丸矩形を塗りで描画します
Declaration
void FillRoundedRect(in float x, in float y, in float width, in float height, float cornerRadius, float degree = 0F)
Parameters
Type | Name | Description |
---|---|---|
Single | x | X座標 |
Single | y | Y座標 |
Single | width | 横幅 |
Single | height | 縦幅 |
Single | cornerRadius | 角丸の半径 |
Single | degree | 回転(度数法) |
FillRoundedRect(float2, float2, Single)
角丸矩形を塗りで描画します
Declaration
void FillRoundedRect(in float2 position, in float2 size, float degree = 0F)
Parameters
Type | Name | Description |
---|---|---|
float2 | position | 位置 |
float2 | size | 大きさ |
Single | degree | 回転(度数法) |
FillRoundedRect(float2, float2, Single, Single)
角丸矩形を塗りで描画します
Declaration
void FillRoundedRect(in float2 position, in float2 size, float cornerRadius, float degree = 0F)
Parameters
Type | Name | Description |
---|---|---|
float2 | position | 位置 |
float2 | size | 大きさ |
Single | cornerRadius | 角丸の半径 |
Single | degree | 回転(度数法) |
GetImageHeight(GcImage)
画像の縦幅を取得します
Declaration
int GetImageHeight(in GcImage image)
Parameters
Type | Name | Description |
---|---|---|
GcImage | image | 画像 |
Returns
Type | Description |
---|---|
Int32 | 縦幅 |
GetImageSize(GcImage)
画像のサイズを取得します
Declaration
int2 GetImageSize(in GcImage image)
Parameters
Type | Name | Description |
---|---|---|
GcImage | image | 画像 |
Returns
Type | Description |
---|---|
int2 | サイズ |
GetImageWidth(GcImage)
画像の横幅を取得します
Declaration
int GetImageWidth(in GcImage image)
Parameters
Type | Name | Description |
---|---|---|
GcImage | image | 画像 |
Returns
Type | Description |
---|---|
Int32 | 横幅 |
RotateCoordinate(Single, Single, Single)
座標系(変換行列)を回転させます
Declaration
void RotateCoordinate(in float degree, in float originX, in float originY)
Parameters
Type | Name | Description |
---|---|---|
Single | degree | 回転量(度数法) |
Single | originX | 回転中心のX座標 |
Single | originY | 回転中心のY座標 |
ScaleCoordinate(Single, Single)
座標系(変換行列)を拡縮させます
Declaration
void ScaleCoordinate(in float sx, in float sy)
Parameters
Type | Name | Description |
---|---|---|
Single | sx | X軸方向の拡縮率 |
Single | sy | Y軸方向の拡縮率 |
SetBackgroundColor(Single, Single, Single)
背景色を指定します
Declaration
void SetBackgroundColor(in float r, in float g, in float b)
Parameters
Type | Name | Description |
---|---|---|
Single | r | 背景色の赤成分 |
Single | g | 背景色の緑成分 |
Single | b | 背景色の青成分 |
SetBackgroundColor(Color)
背景色を指定します
Declaration
void SetBackgroundColor(in Color color)
Parameters
Type | Name | Description |
---|---|---|
Color | color | 背景色 |
SetColor(Byte, Byte, Byte, Byte)
描画色を指定します
Declaration
void SetColor(in byte r, in byte g, in byte b, byte a = 255)
Parameters
Type | Name | Description |
---|---|---|
Byte | r | 描画色の赤成分 |
Byte | g | 描画色の緑成分 |
Byte | b | 描画色の青成分 |
Byte | a | 描画色の不透明度 |
SetColor(Single, Single, Single, Single)
描画色を指定します
Declaration
void SetColor(in float r, in float g, in float b, float a = 1F)
Parameters
Type | Name | Description |
---|---|---|
Single | r | 描画色の赤成分 |
Single | g | 描画色の緑成分 |
Single | b | 描画色の青成分 |
Single | a | 描画色の不透明度 |
SetColor(Color)
描画色を指定します
Declaration
void SetColor(in Color color)
Parameters
Type | Name | Description |
---|---|---|
Color | color | 描画色 |
SetColor(Color, Single)
描画色を指定します
Declaration
void SetColor(in Color color, in float alpha)
Parameters
Type | Name | Description |
---|---|---|
Color | color | 描画色 |
Single | alpha | 描画色の不透明度 |
SetCoordinate(float2x3)
座標系(変換行列)を指定します
Declaration
void SetCoordinate(in float2x3 matrix)
Parameters
Type | Name | Description |
---|---|---|
float2x3 | matrix | 座標系(変換行列) |
SetFont(GcFont)
フォントを指定します
Declaration
void SetFont(in GcFont font)
Parameters
Type | Name | Description |
---|---|---|
GcFont | font | フォント |
SetFontSize(Int32)
フォントサイズを指定します
Declaration
void SetFontSize(in int fontSize)
Parameters
Type | Name | Description |
---|---|---|
Int32 | fontSize | フォントサイズ |
SetLineCap(GcLineCap)
描線の端点の形状を指定します
Declaration
void SetLineCap(in GcLineCap lineCap)
Parameters
Type | Name | Description |
---|---|---|
GcLineCap | lineCap | 描線の端点の形状 |
SetLineWidth(Single)
描線の太さを指定します
Declaration
void SetLineWidth(in float lineWidth)
Parameters
Type | Name | Description |
---|---|---|
Single | lineWidth | 描線の太さ |
SetRectAnchor(GcAnchor)
矩形や画像のアンカー位置を指定します
Declaration
void SetRectAnchor(in GcAnchor anchor)
Parameters
Type | Name | Description |
---|---|---|
GcAnchor | anchor | アンカー位置 |
SetStringAnchor(GcAnchor)
文字列のアンカー位置を指定します
Declaration
void SetStringAnchor(in GcAnchor anchor)
Parameters
Type | Name | Description |
---|---|---|
GcAnchor | anchor | アンカー位置 |
SetStyle(GcStyle)
スタイルを指定します
Declaration
void SetStyle(in GcStyle style)
Parameters
Type | Name | Description |
---|---|---|
GcStyle | style |
TranslateCoordinate(Single, Single)
座標系(変換行列)を平行移動させます
Declaration
void TranslateCoordinate(in float tx, in float ty)
Parameters
Type | Name | Description |
---|---|---|
Single | tx | X軸方向の移動量 |
Single | ty | Y軸方向の移動量 |