CURL.GUI.SHAPES (パッケージ)

このパッケージは、チャート、グラフ、またはその他の 2D グラフィックを簡単に実装できる軽量の 2D グラフィック システムを提供します。

説明

Curl 形状システムは、Curl GUI Toolkit によく似た保持モードのグラフィック システムです。グラフィカル オブジェクトとそれらの相互関係を格納して保持します。
形状の基本クラスは、Shape です。Shape の標準コンテナは Canvas です。
独自の Shape サブクラスを実装できます。また、次の組み込みの Shape 実装も用意されています。


{import * from CURL.GUI.SHAPES}

{Canvas
    width = 3in,
    height = 2in,
    {GraphicShape
        {Frame
            vorigin = "top",
            horigin = "left",
            width = 1.5in,
            {text
                This is a pie chart made up of several overlapping
                EllipseShapes.
            }
        }
    },
    {EllipseShape
        {GRect -2in, 3in, 0in, 1in},
        border-color = "black",
        border-width = 1pt,
        color = "red",
        start-angle = 0deg,
        stop-angle = 30% * 360deg,
        {on PointerEnter at shape:Shape do
            set shape.color = "cyan"
        },
        {on PointerLeave at shape:Shape do
            set shape.color = "red"
        }
    },
    {EllipseShape
        {GRect -2in, 3in, 0in, 1in},
        border-color = "black",
        border-width = 1pt,
        color = "blue",
        start-angle = 30% * 360deg,
        stop-angle = 85% * 360deg,
        {on PointerEnter at shape:Shape do
            set shape.color = "cyan"
        },
        {on PointerLeave at shape:Shape do
            set shape.color = "blue"
        }
    },
    {EllipseShape
        {GRect -2in, 3in, 0in, 1in},
        border-color = "black",
        border-width = 1pt,
        color = "green",
        start-angle = 85% * 360deg,
        stop-angle = 95% * 360deg,
        {on PointerEnter at shape:Shape do
            set shape.color = "cyan"
        },
        {on PointerLeave at shape:Shape do
            set shape.color = "green"
        }
    },
    {EllipseShape
        {GRect -2in, 3in, 0in, 1in},
        border-color = "black",
        border-width = 1pt,
        color = "grey",
        start-angle = 95% * 360deg,
        stop-angle = 100% * 360deg,
        {on PointerEnter at shape:Shape do
            set shape.color = "cyan"
        },
        {on PointerLeave at shape:Shape do
            set shape.color = "grey"
        }
    }
}
パッケージ メンバ:
arrow-body-width
arrow-head-length
arrow-head-style
arrow-head-width
arrow-tail-length
arrow-tail-style
arrow-tail-width
ArrowShape
ArrowStyle
Canvas
CanvasAnchor
CanvasLayout
corner-radius
DiscreteGraphicSelectAll
DiscreteGraphicSelectionContext
DiscreteGraphicSelectionFrame
EllipseShape
GraphicShape
ImageShape
line-style
PathShape
RectangleShape
RegionShape
RoundedRectangleShape
Shape
shape-root
ShapeBox
ShapeBoxLayout
ShapeContainerBase
ShapeDragee
ShapeGroup
ShapeLayout
ShapeRoot
ShapeSelectable
ShapeSelectionPolygon
start-angle
stop-angle
stroke-thickness
TextShape
wedge?