Small Basic > Shapes(図形)
のぶ亭『プログラミングの相談窓口』 … 様々なプログラミング問題を個別対応致します |
Shapes(図形)
Shape オブジェクトで Graphics window に図形を追加、移動、回転することができます
オペレーション(Operations) | ||
メソッド | 構文 | 内容 |
AddRectangle | Shapes.AddRectangle(width, height) | 指定された横幅と高さで四角形を追加 |
width 四角形の横幅 | ||
height 四角形の高さ | ||
Returns Graphics Window に追加された四角形 | ||
AddEllipse | Shapes.AddEllipse(width, height) | 指定された横幅と高さで楕円を追加 |
width 楕円の横幅 | ||
height 楕円の高さ | ||
Returns Graphics Window に追加された楕円 | ||
AddTriangle | Shapes.AddTriangle(x1, y1, x2, y2, x3, y3) | 指定された点に代表された三角形を追加 |
x1 最初の点の X 座標 | ||
y1 最初の点の Y 座標 | ||
x2 2 番目の点の X 座標 | ||
y2 2 番目の点の Y 座標 | ||
x3 3 番目の点の X 座標 | ||
y3 3 番目の点の Y 座標 | ||
Returns Graphics Window に追加された三角形 | ||
AddLine | Shapes.AddLine(x1, y1, x2, y2) | 指定された点と点の間に線を追加 |
x1 最初の点の X 座標 | ||
y1 最初の点の Y 座標 | ||
x2 2 番目の点の X 座標 | ||
y2 2 番目の点の Y 座標 | ||
Returns Graphics Window に追加された線 | ||
AddImage | Shapes.AddImage(imageName) | イメージを図形として追加(図形は、移動、動画化、回転ができる) |
imageName 描画対象のイメージの名前 | ||
Returns Graphics Window に追加されたイメージ | ||
AddText | Shapes.AddText(text) | テキストを、移動、動画化、または回転できる図形として追加 |
text 追加するテキスト | ||
Returns Graphics Window に追加された、図形化されたテキスト | ||
SetText | Shapes.SetText(shapeName, text) | 図形化されたテキストの文章を設定 |
shapeName 図形化されたテキストの名前 | ||
text 設定する新しいテキストの値 | ||
Returns Nothing | ||
Remove | Shapes.Remove(shapeName) | Graphics Window から図形を削除 |
shapeName 削除する必要のある図形の名前 | ||
Returns Nothing | ||
Move | Shapes.Move(shapeName, x, y) | 指定された名前の図形を新しい場所に移動 |
shapeName 移動する図形の名前 | ||
x 新しい場所の X 座標 | ||
y 新しい場所の Y 座標 | ||
Returns Nothing | ||
Rotate | Shapes.Rotate(shapeName, angle) | 指定された名前の図形を指定された角度に回転する |
shapeName 回転させる図形の名前 | ||
angle 回転させる図形の角度 | ||
Returns Nothing | ||
Zoom | Shapes.Zoom(shapeName, scaleX, scaleY) | 指定されたズームレベルで図形を拡大縮小する(最小値は 0.1、で最大値は 20 ) |
shapeName 回転させる図形の名前 | ||
scaleX X 軸のズームレベル | ||
scaleY Y 軸のズームレベル | ||
Returns Nothing | ||
Animate | Shapes.Animate(shapeName, x, y, duration) | 指定された名前の図形を指定された位置に移動 |
shapeName 移動させる図形の名前 | ||
x 新しい場所の X 座標 | ||
y 新しい場所の Y 座標 | ||
duration アニメーション時間(ミリ秒) | ||
Returns Nothing | ||
GetLeft | Shapes.GetLeft(shapeName) | 指定された図形の左の座標を取得 |
shapeName 図形の名前 | ||
Returns 図形の左座標 | ||
GetTop | Shapes.GetTop(shapeName) | 指定された図形の上座標を取得 |
shapeName 図形の名前 | ||
Returns 図形の上座標 | ||
GetOpacity | Shapes.GetOpacity(shapeName) | 図形の不透明度を取得 |
shapeName 図形の名前 | ||
Returns オブジェクトの不透明度を示す値(0~100、0は透明、100は不透明) | ||
SetOpacity | Shapes.SetOpacity(shapeName, level) | 図形の不透明度を設定 |
shapeName 形の名前 | ||
level 不透明度を設定(0~100、0は透明、100は不透明) | ||
Returns Nothing | ||
HideShape | Shapes.HideShape(shapeName) | すでに追加された図形を隠す |
shapeName 図形の名前 | ||
Returns Nothing | ||
ShowShape | Shapes.ShowShape(shapeName) | 隠された図形を表示 |
shapeName 図形の名前 | ||
Returns Nothing | ||