Skip to content

インターフェイス IGraphicsEx

Namespace: GameCanvas

csharp
public interface IGraphicsEx : IGraphics

継承元

プロパティ

BackgroundColor

継承元: IGraphics

csharp
Color BackgroundColor { get; set; }

背景色

BorderColor

継承元: IGraphics

csharp
Color BorderColor { get; }

キャンバス外に表示される帯の色

備考

ChangeBorderColor を呼び出すことで変更できます

CanvasAABB

csharp
GcAABB CanvasAABB { get; }

キャンバスのAABB

CanvasCenter

csharp
float2 CanvasCenter { get; }

キャンバスの中心座標

CanvasHeight

csharp
int CanvasHeight { get; }

キャンバスの縦幅

CanvasResolution

csharp
GcResolution CanvasResolution { get; }

キャンバスの解像度とリフレッシュレート

CanvasSize

継承元: IGraphics

csharp
int2 CanvasSize { get; }

キャンバス解像度

備考

ChangeCanvasSize を呼び出すことで変更できます

CanvasWidth

csharp
int CanvasWidth { get; }

キャンバスの横幅

CircleResolution

継承元: IGraphics

csharp
int CircleResolution { get; set; }

円の解像度

Color

継承元: IGraphics

csharp
Color Color { get; set; }

描画色

ColorAqua

csharp
Color ColorAqua { get; }

水色

ColorBlack

csharp
Color ColorBlack { get; }

黒色

ColorBlue

csharp
Color ColorBlue { get; }

青色

ColorCyan

csharp
Color ColorCyan { get; }

シアン

ColorGray

csharp
Color ColorGray { get; }

灰色

ColorGreen

csharp
Color ColorGreen { get; }

緑色

ColorPurple

csharp
Color ColorPurple { get; }

紫色

ColorRed

csharp
Color ColorRed { get; }

赤色

ColorWhite

csharp
Color ColorWhite { get; }

白色

ColorYellow

csharp
Color ColorYellow { get; }

黄色

CoordinateScope

継承元: IGraphics

csharp
CoordinateScope CoordinateScope { get; }

PushCoordinatePopCoordinate が自動的に呼び出されるスコープ

CornerRadius

継承元: IGraphics

csharp
float CornerRadius { get; set; }

角丸の半径

CurrentCoordinate

継承元: IGraphics

csharp
float2x3 CurrentCoordinate { get; set; }

現在の座標系(変換行列)

CurrentStyle

継承元: IGraphics

csharp
GcStyle CurrentStyle { get; set; }

現在のスタイル

DeviceScreenHeight

csharp
int DeviceScreenHeight { get; }

端末スクリーンの縦幅

DeviceScreenSize

継承元: IGraphics

csharp
int2 DeviceScreenSize { get; }

端末スクリーン解像度

DeviceScreenWidth

csharp
int DeviceScreenWidth { get; }

端末スクリーンの横幅

Font

継承元: IGraphics

csharp
GcFont Font { get; set; }

フォント種別

FontSize

継承元: IGraphics

csharp
int FontSize { get; set; }

フォントサイズ

LineCap

継承元: IGraphics

csharp
GcLineCap LineCap { get; set; }

描線の端点の形状

LineWidth

継承元: IGraphics

csharp
float LineWidth { get; set; }

描線の太さ

RectAnchor

継承元: IGraphics

csharp
GcAnchor RectAnchor { get; set; }

矩形のアンカー位置

StringAnchor

継承元: IGraphics

csharp
GcAnchor StringAnchor { get; set; }

文字列のアンカー位置

StyleScope

継承元: IGraphics

csharp
StyleScope StyleScope { get; }

PushStylePopStyle が自動的に呼び出されるスコープ

メソッド

CalcStringHeight(string)

継承元: IGraphics

csharp
float CalcStringHeight(in string str)

文字列の縦幅を計算します

パラメーター

  • str — 文字列

戻り値

縦幅

CalcStringSize(string)

継承元: IGraphics

csharp
float2 CalcStringSize(in string str)

文字列のサイズを計算します

パラメーター

  • str — 文字列

戻り値

サイズ

CalcStringWidth(string)

継承元: IGraphics

csharp
float CalcStringWidth(in string str)

文字列の横幅を計算します

パラメーター

  • str — 文字列

戻り値

横幅

CanvasToScreenPoint(float2, float2)

継承元: IGraphics

csharp
void CanvasToScreenPoint(in float2 canvas, out float2 screen)

キャンバス座標を端末スクリーン座標に変換します

パラメーター

  • canvas — 変換元 キャンバス座標
  • screen — 変換後 端末スクリーン座標

CanvasToScreenPoint(float2, int2)

継承元: IGraphics

csharp
void CanvasToScreenPoint(in float2 canvas, out int2 screen)

キャンバス座標を端末スクリーン座標に変換します

パラメーター

  • canvas — 変換元 キャンバス座標
  • screen — 変換後 端末スクリーン座標

ChangeBorderColor(Color)

継承元: IGraphics

csharp
void ChangeBorderColor(in Color color)

キャンバス外の帯の色を変更します

備考

既存キャンバスの描画内容は全て破棄されます

パラメーター

  • color — 新しい帯の色

ChangeBorderColor(float, float, float)

csharp
void ChangeBorderColor(in float r, in float g, in float b)

帯の色を変更します

パラメーター

  • r — 帯の色の赤成分
  • g — 帯の色の緑成分
  • b — 帯の色の青成分

ChangeCanvasSize(int, int)

csharp
void ChangeCanvasSize(in int width, in int height)

キャンバス解像度を指定します

備考

  • 初期値は 720x1280 です
  • ディスプレイ解像度と縦横比が異なる場合は、上下もしくは左右に帯がつきます

パラメーター

  • width — 横幅
  • height — 縦幅

ChangeCanvasSize(int2)

継承元: IGraphics

csharp
void ChangeCanvasSize(in int2 size)

キャンバス解像度を変更します

備考

  • 初期値は 720x1280 です
  • ディスプレイ解像度と縦横比が異なる場合は、上下もしくは左右に帯がつきます
  • 既存キャンバスの描画内容は全て破棄されます

パラメーター

  • size — 新しいキャンバス解像度

ClearCoordinate()

継承元: IGraphics

csharp
void ClearCoordinate()

CurrentCoordinate をリセットします

ClearScreen()

継承元: IGraphics

csharp
void ClearScreen()

キャンバスを BackgroundColor で塗りつぶします

ClearStyle()

継承元: IGraphics

csharp
void ClearStyle()

CurrentStyle をリセットします

DrawCircle()

継承元: IGraphics

csharp
void DrawCircle()

中抜きの円を描画します

DrawCircle(float, float, float)

csharp
void DrawCircle(in float x, in float y, in float radius)

円を線で描画します

パラメーター

  • x — 中心のX座標
  • y — 中心のY座標
  • radius — 半径

DrawCircle(float2, float)

csharp
void DrawCircle(in float2 position, in float radius)

円を線で描画します

パラメーター

  • position — 中心の座標
  • radius — 半径

DrawCircle(GcCircle)

継承元: IGraphics

csharp
void DrawCircle(in GcCircle circle)

中抜きの円を描画します

パラメーター

  • circle — 円

DrawImage(GcImage, float, float, float, float, float)

csharp
void DrawImage(in GcImage image, in float x, in float y, in float width, in float height, float degree = 0f)

画像を拡縮して描画します

パラメーター

  • image — 描画する画像
  • x — X座標
  • y — Y座標
  • width — 横幅。画像の横幅がこれになるように拡縮される
  • height — 縦幅。画像の縦幅がこれになるように拡縮される
  • degree — 回転(度数法)

DrawImage(GcImage, float, float, float)

csharp
void DrawImage(in GcImage image, in float x, in float y, float degree = 0f)

画像を描画します

パラメーター

  • image — 描画する画像
  • x — X座標
  • y — Y座標
  • degree — 回転(度数法)

DrawImage(GcImage, float2, float)

継承元: IGraphics

csharp
void DrawImage(in GcImage image, in float2 position, float degree = 0f)

画像を描画します

パラメーター

  • image — 描画する画像
  • position — 位置
  • degree — 回転(度数法)

DrawImage(GcImage, GcRect)

継承元: IGraphics

csharp
void DrawImage(in GcImage image, in GcRect rect)

画像を拡縮して描画します

パラメーター

  • image — 描画する画像
  • rect — 画像をフィッティングする矩形領域

DrawImage(GcImage)

継承元: IGraphics

csharp
void DrawImage(in GcImage image)

画像を描画します

パラメーター

  • image — 描画する画像

DrawLine()

継承元: IGraphics

csharp
void DrawLine()

線を描画します

DrawLine(float, float, float, float)

csharp
void DrawLine(in float x0, in float y0, in float x1, in float y1)

線を描画します

パラメーター

  • x0 — 始点のX座標
  • y0 — 始点のY座標
  • x1 — 終点のX座標
  • y1 — 終点のY座標

DrawLine(float2, float2)

csharp
void DrawLine(in float2 begin, in float2 end)

線を描画します

パラメーター

  • begin — 始点
  • end — 終点

DrawLine(GcLine)

継承元: IGraphics

csharp
void DrawLine(in GcLine line)

線を描画します

パラメーター

  • line — 線

DrawRect()

継承元: IGraphics

csharp
void DrawRect()

矩形を線で描画します

DrawRect(float, float, float, float, float)

csharp
void DrawRect(in float x, in float y, in float width, in float height, float degree = 0f)

矩形を線で描画します

パラメーター

  • x — X座標
  • y — Y座標
  • width — 横幅
  • height — 縦幅
  • degree — 回転(度数法)

DrawRect(float2, float2, float)

csharp
void DrawRect(in float2 position, in float2 size, float degree = 0f)

矩形を線で描画します

パラメーター

  • position — 位置
  • size — 大きさ
  • degree — 回転(度数法)

DrawRect(GcRect)

継承元: IGraphics

csharp
void DrawRect(in GcRect rect)

矩形を線で描画します

パラメーター

  • rect — 矩形

DrawRoundedRect()

継承元: IGraphics

csharp
void DrawRoundedRect()

角丸矩形を線で描画します

DrawRoundedRect(float, float, float, float, float, float)

csharp
void DrawRoundedRect(in float x, in float y, in float width, in float height, float cornerRadius, float degree = 0f)

角丸矩形を線で描画します

パラメーター

  • x — X座標
  • y — Y座標
  • width — 横幅
  • height — 縦幅
  • cornerRadius — 角丸の半径
  • degree — 回転(度数法)

DrawRoundedRect(float, float, float, float, float)

csharp
void DrawRoundedRect(in float x, in float y, in float width, in float height, float degree = 0f)

角丸矩形を線で描画します

パラメーター

  • x — X座標
  • y — Y座標
  • width — 横幅
  • height — 縦幅
  • degree — 回転(度数法)

DrawRoundedRect(float2, float2, float, float)

csharp
void DrawRoundedRect(in float2 position, in float2 size, float cornerRadius, float degree = 0f)

角丸矩形を線で描画します

パラメーター

  • position — 位置
  • size — 大きさ
  • cornerRadius — 角丸の半径
  • degree — 回転(度数法)

DrawRoundedRect(float2, float2, float)

csharp
void DrawRoundedRect(in float2 position, in float2 size, float degree = 0f)

角丸矩形を線で描画します

パラメーター

  • position — 位置
  • size — 大きさ
  • degree — 回転(度数法)

DrawRoundedRect(GcRect, float)

継承元: IGraphics

csharp
void DrawRoundedRect(in GcRect rect, float cornerRadius)

角丸矩形を線で描画します

パラメーター

  • rect — 二等辺三角形が収まる矩形
  • cornerRadius — 角丸の半径

DrawRoundedRect(GcRect)

継承元: IGraphics

csharp
void DrawRoundedRect(in GcRect rect)

角丸矩形を線で描画します

パラメーター

  • rect — 二等辺三角形が収まる矩形

DrawString(string, float, float, float, float, float)

csharp
void DrawString(in string str, in float x, in float y, in float width, in float height, float degree = 0f)

文字列を拡縮して描画します

パラメーター

  • str — 描画する文字列
  • x — X座標
  • y — Y座標
  • width — 横幅。文字列の横幅がこれになるように拡縮される
  • height — 縦幅。文字列の縦幅がこれになるように拡縮される
  • degree — 回転(度数法)

DrawString(string, float, float, float)

csharp
void DrawString(in string str, in float x, in float y, float degree = 0f)

文字列を描画します

パラメーター

  • str — 描画する文字列
  • x — X座標
  • y — Y座標
  • degree — 回転(度数法)

DrawString(string, float2, float)

継承元: IGraphics

csharp
void DrawString(in string str, in float2 position, float degree = 0f)

文字列を描画します

パラメーター

  • str — 描画する文字列
  • position — 位置
  • degree — 回転(度数法)

DrawString(string, GcRect)

継承元: IGraphics

csharp
void DrawString(in string str, in GcRect rect)

文字列を拡縮して描画します

パラメーター

  • str — 描画する文字列
  • rect — 文字列をフィッティングする矩形領域

DrawString(string)

継承元: IGraphics

csharp
void DrawString(in string str)

文字列を描画します

パラメーター

  • str — 描画する文字列

DrawTexture(Texture, float, float, float, float, float)

csharp
void DrawTexture(in Texture texture, in float x, in float y, in float width, in float height, float degree = 0f)

テクスチャーを拡縮して描画します

パラメーター

  • texture — 描画するテクスチャー
  • x — X座標
  • y — Y座標
  • width — 横幅。画像の横幅がこれになるように拡縮される
  • height — 縦幅。画像の縦幅がこれになるように拡縮される
  • degree — 回転(度数法)

DrawTexture(Texture, float2, float)

継承元: IGraphics

csharp
void DrawTexture(in Texture texture, in float2 position, float degree = 0f)

テクスチャーを描画します

パラメーター

  • texture — 描画するテクスチャー
  • position — 位置
  • degree — 回転(度数法)

DrawTexture(Texture, float2x3)

継承元: IGraphics

csharp
void DrawTexture(in Texture texture, in float2x3 matrix)

テクスチャーを変形して描画します

パラメーター

  • texture — 描画するテクスチャー
  • matrix — アフィン変換行列

DrawTexture(Texture, GcRect)

継承元: IGraphics

csharp
void DrawTexture(in Texture texture, in GcRect rect)

テクスチャーを拡縮して描画します

パラメーター

  • texture — 描画するテクスチャー
  • rect — テクスチャーをフィッティングする矩形領域

DrawTexture(Texture)

継承元: IGraphics

csharp
void DrawTexture(in Texture texture)

テクスチャーを描画します

パラメーター

  • texture — 描画するテクスチャー

FillCircle()

継承元: IGraphics

csharp
void FillCircle()

円を塗りで描画します

FillCircle(float, float, float)

csharp
void FillCircle(in float x, in float y, in float radius)

円を塗りで描画します

パラメーター

  • x — 中心のX座標
  • y — 中心のY座標
  • radius — 半径

FillCircle(float2, float)

csharp
void FillCircle(in float2 position, in float radius)

円を塗りで描画します

パラメーター

  • position — 中心の座標
  • radius — 半径

FillCircle(GcCircle)

継承元: IGraphics

csharp
void FillCircle(in GcCircle circle)

円を塗りで描画します

パラメーター

  • circle — 円

FillRect()

継承元: IGraphics

csharp
void FillRect()

矩形を塗りで描画します

FillRect(float, float, float, float, float)

csharp
void FillRect(in float x, in float y, in float width, in float height, float degree = 0f)

矩形を塗りで描画します

パラメーター

  • x — X座標
  • y — Y座標
  • width — 横幅
  • height — 縦幅
  • degree — 回転(度数法)

FillRect(float2, float2, float)

csharp
void FillRect(in float2 position, in float2 size, float degree = 0f)

矩形を塗りで描画します

パラメーター

  • position — 位置
  • size — 大きさ
  • degree — 回転(度数法)

FillRect(GcRect)

継承元: IGraphics

csharp
void FillRect(in GcRect rect)

矩形を塗りで描画します

パラメーター

  • rect — 矩形

FillRoundedRect()

継承元: IGraphics

csharp
void FillRoundedRect()

角丸矩形を塗りで描画します

FillRoundedRect(float, float, float, float, float, float)

csharp
void FillRoundedRect(in float x, in float y, in float width, in float height, float cornerRadius, float degree = 0f)

角丸矩形を塗りで描画します

パラメーター

  • x — X座標
  • y — Y座標
  • width — 横幅
  • height — 縦幅
  • cornerRadius — 角丸の半径
  • degree — 回転(度数法)

FillRoundedRect(float, float, float, float, float)

csharp
void FillRoundedRect(in float x, in float y, in float width, in float height, float degree = 0f)

角丸矩形を塗りで描画します

パラメーター

  • x — X座標
  • y — Y座標
  • width — 横幅
  • height — 縦幅
  • degree — 回転(度数法)

FillRoundedRect(float2, float2, float, float)

csharp
void FillRoundedRect(in float2 position, in float2 size, float cornerRadius, float degree = 0f)

角丸矩形を塗りで描画します

パラメーター

  • position — 位置
  • size — 大きさ
  • cornerRadius — 角丸の半径
  • degree — 回転(度数法)

FillRoundedRect(float2, float2, float)

csharp
void FillRoundedRect(in float2 position, in float2 size, float degree = 0f)

角丸矩形を塗りで描画します

パラメーター

  • position — 位置
  • size — 大きさ
  • degree — 回転(度数法)

FillRoundedRect(GcRect, float)

継承元: IGraphics

csharp
void FillRoundedRect(in GcRect rect, float cornerRadius)

角丸矩形を塗りで描画します

パラメーター

  • rect — 二等辺三角形が収まる矩形
  • cornerRadius — 角丸の半径

FillRoundedRect(GcRect)

継承元: IGraphics

csharp
void FillRoundedRect(in GcRect rect)

角丸矩形を塗りで描画します

パラメーター

  • rect — 二等辺三角形が収まる矩形

GetImageHeight(GcImage)

csharp
int GetImageHeight(in GcImage image)

画像の縦幅を取得します

パラメーター

  • image — 画像

戻り値

縦幅

GetImageSize(GcImage)

csharp
int2 GetImageSize(in GcImage image)

画像のサイズを取得します

パラメーター

  • image — 画像

戻り値

サイズ

GetImageWidth(GcImage)

csharp
int GetImageWidth(in GcImage image)

画像の横幅を取得します

パラメーター

  • image — 画像

戻り値

横幅

PopCoordinate()

継承元: IGraphics

csharp
void PopCoordinate()

スタックから座標系(変換行列)を取り出し CurrentCoordinate に上書きします

PopStyle()

継承元: IGraphics

csharp
void PopStyle()

スタックから描画スタイルを取り出し CurrentStyle に上書きします

PushCoordinate()

継承元: IGraphics

csharp
void PushCoordinate()

CurrentCoordinate をスタックに保存します

PushStyle()

継承元: IGraphics

csharp
void PushStyle()

CurrentStyle をスタックに保存します

RebuildFontTexture()

継承元: IGraphics

csharp
void RebuildFontTexture()

フォントテクスチャ―を再生成します

備考

  • テキスト描画が乱れた場合にのみ呼び出すことを想定しています
  • 実際に再生成が行われるのは、この関数を呼び出した次のフレームの冒頭です

RotateCoordinate(float, float, float)

csharp
void RotateCoordinate(in float degree, in float originX, in float originY)

座標系(変換行列)を回転させます

パラメーター

  • degree — 回転量(度数法)
  • originX — 回転中心のX座標
  • originY — 回転中心のY座標

RotateCoordinate(float, float2)

継承元: IGraphics

csharp
void RotateCoordinate(in float degree, in float2 origin)

座標系(変換行列)を指定した座標を中心に回転させます

パラメーター

  • degree — 回転量(度数法)
  • origin — 回転中心

RotateCoordinate(float)

継承元: IGraphics

csharp
void RotateCoordinate(in float degree)

座標系(変換行列)を回転させます

パラメーター

  • degree — 回転量(度数法)

ScaleCoordinate(float, float)

csharp
void ScaleCoordinate(in float sx, in float sy)

座標系(変換行列)を拡縮させます

パラメーター

  • sx — X軸方向の拡縮率
  • sy — Y軸方向の拡縮率

ScaleCoordinate(float2)

継承元: IGraphics

csharp
void ScaleCoordinate(in float2 scaling)

座標系(変換行列)を拡縮させます

パラメーター

  • scaling — 拡縮率

ScreenToCanvasPoint(float2, float2)

継承元: IGraphics

csharp
void ScreenToCanvasPoint(in float2 screen, out float2 canvas)

端末スクリーン座標をキャンバス座標に変換します

パラメーター

  • screen — 変換元 端末スクリーン座標
  • canvas — 変換後 キャンバス座標

ScreenToCanvasPoint(float2, int2)

継承元: IGraphics

csharp
void ScreenToCanvasPoint(in float2 screen, out int2 canvas)

端末スクリーン座標をキャンバス座標に変換します

パラメーター

  • screen — 変換元 端末スクリーン座標
  • canvas — 変換後 キャンバス座標

SetBackgroundColor(Color)

csharp
void SetBackgroundColor(in Color color)

背景色を指定します

パラメーター

  • color — 背景色

SetBackgroundColor(float, float, float)

csharp
void SetBackgroundColor(in float r, in float g, in float b)

背景色を指定します

パラメーター

  • r — 背景色の赤成分
  • g — 背景色の緑成分
  • b — 背景色の青成分

SetColor(byte, byte, byte, byte)

csharp
void SetColor(in byte r, in byte g, in byte b, byte a = 255)

描画色を指定します

パラメーター

  • r — 描画色の赤成分
  • g — 描画色の緑成分
  • b — 描画色の青成分
  • a — 描画色の不透明度

SetColor(Color, float)

csharp
void SetColor(in Color color, in float alpha)

描画色を指定します

パラメーター

  • color — 描画色
  • alpha — 描画色の不透明度

SetColor(Color)

csharp
void SetColor(in Color color)

描画色を指定します

パラメーター

  • color — 描画色

SetColor(float, float, float, float)

csharp
void SetColor(in float r, in float g, in float b, float a = 1f)

描画色を指定します

パラメーター

  • r — 描画色の赤成分
  • g — 描画色の緑成分
  • b — 描画色の青成分
  • a — 描画色の不透明度

SetCoordinate(float2x3)

csharp
void SetCoordinate(in float2x3 matrix)

座標系(変換行列)を指定します

パラメーター

  • matrix — 座標系(変換行列)

SetFont(GcFont)

csharp
void SetFont(in GcFont font)

フォントを指定します

パラメーター

  • font — フォント

SetFontSize(int)

csharp
void SetFontSize(in int fontSize)

フォントサイズを指定します

パラメーター

  • fontSize — フォントサイズ

SetLineCap(GcLineCap)

csharp
void SetLineCap(in GcLineCap lineCap)

描線の端点の形状を指定します

パラメーター

  • lineCap — 描線の端点の形状

SetLineWidth(float)

csharp
void SetLineWidth(in float lineWidth)

描線の太さを指定します

パラメーター

  • lineWidth — 描線の太さ

SetRectAnchor(GcAnchor)

csharp
void SetRectAnchor(in GcAnchor anchor)

矩形や画像のアンカー位置を指定します

パラメーター

  • anchor — アンカー位置

SetStringAnchor(GcAnchor)

csharp
void SetStringAnchor(in GcAnchor anchor)

文字列のアンカー位置を指定します

パラメーター

  • anchor — アンカー位置

SetStyle(GcStyle)

csharp
void SetStyle(in GcStyle style)

スタイルを指定します

パラメーター

  • style

TranslateCoordinate(float, float)

csharp
void TranslateCoordinate(in float tx, in float ty)

座標系(変換行列)を平行移動させます

パラメーター

  • tx — X軸方向の移動量
  • ty — Y軸方向の移動量

TranslateCoordinate(float2)

継承元: IGraphics

csharp
void TranslateCoordinate(in float2 translation)

座標系(変換行列)を平行移動させます

パラメーター

  • translation — 移動量

Released under the MIT License.