図形配列仕様 - nonkit/Shapes GitHub Wiki

図形配列仕様

Version 2.1.9 たかはしのんき

目的

この仕様は Microsoft Small Basic プログラミング言語での図形配列を定義します。図形配列の典型的なアプリケーションは図形エディターです。

定義

この仕様は図形配列のデータフォーマットと配列を操作するサブルーチンについて定義します。

データフォーマット

配列 配列の名前は shape です。

インデックス 図形配列では以下のインデックスを使用します。

  • func - 機能は rect(rectangle - 長方形)、ell(ellipse - 楕円)、tri(isosceles triangle - 二等辺三角形)、line(直線)、img(image - 画像)および text(テキスト)です。
  • x - 図形の左端の x 座標。
  • y - 図形の上端の y 座標。
  • width - 長方形、楕円、画像の幅。
  • height - 長方形、楕円、画像の高さ。
  • bc - #FFFF00 のような塗りつぶしの色。
  • pc - #000000 のような枠線の色。
  • x1 - 直線の始点または二等辺三角形の頂点の x 座標。
  • y1 - 直線の始点または二等辺三角形の頂点の y 座標。
  • x2 - 直線の終点または二等辺三角形の底辺の左の頂点の x 座標。
  • y2 - 直線の終点または二等辺三角形の底辺の左の頂点の y 座標。
  • x3 - 二等辺三角形の底辺の右の頂点の x 座標。
  • y3 - 二等辺三角形の底辺の右の頂点の y 座標。
  • text - テキストの文字列。
  • fn - テキストのフォント名。
  • fs - テキストのフォントサイズ。
  • fb - テキストが太字の場合は "TRUE"。
  • fi - テキストがイタリックの場合は "TRUE"。
  • name - 図形のユーザ定義名。
  • obj -(内部利用のみ)システムから与えられる図形名。
  • rx -(内部利用のみ)回転された図形の元の X 座標。
  • ry -(内部利用のみ)回転された図形の元の Y 座標。
  • wx -(内部利用のみ)回転された図形の Silverlight 回避策の x 座標。
  • wy -(内部利用のみ)回転された図形の Silverlight 回避策の y 座標。

triangle

仮想機能(入力のみ)

これらの機能は入力のみで上記の他の機能に変換される。

  • func - hex(hexagon - 六角形)、para(parallelogram - 平行四辺形)および trap(trapezoid - 台形)。
  • ratio - 左上の頂点の相対的 x 座標位置を高さで割った値(初期値は 0.25)。

hexagon

サブルーチン

  • Shapes_Init - initializes the shape array and the offset shX and shY.
  • Shapes_Convert - converts virtual functions to functions between iMin and iMax. Then returns new iMax.
  • Shapes_CalcWidthAndHeight - (internal use only) calculates total width and height of shapes.
  • Shapes_CalcRotateZoomPos - (internal use only) calculates position for rotated and zoomed shape.
  • Group_Add - adds the shapes as a group with a name.
  • Group_Flip - flips a group of shapes by angle around the y axis.
  • Group_Hide - hides a group of shapes.
  • Group_Move - moves a group of shapes to (x, y).
  • Group_Remove - removes a group of shapes.
  • Group_Rotate - rotates a group of shapes by angle around the z axis.
  • Group_Show - shows a group of shapes.
  • Group_Zoom - zooms a group of shapes.

関連項目

他の言語