コード例 #1
0
ファイル: GUIExamplesStatic.cs プロジェクト: lochrist/UniVer
    /// <summary>
    /// Lines example
    /// </summary>
    private void DrawLines()
    {
        Drawing2D.DrawRect(new Rect(mRectangleX, mRectangleY, mRectangleWidth, mRectangleHeight));
        Drawing2D.DrawText("Lines & Arrows", mRectangleX + 5, mRectangleY + 5, 18, Color.white, mBitmapFont);

        float x = 15 - mSampleWidth;
        float y = 60;

        Drawing2D.DrawLine(new Vector2(x        += mSampleWidth, y), new Vector2(x + mSampleWidth - mSamplesMargin, y), ToColor(36, 86, 188), 4f);
        Drawing2D.DrawLine(new Vector2(x        += mSampleWidth, y), new Vector2(x + mSampleWidth - mSamplesMargin, y), ToColor(93, 166, 221), 8f);
        Drawing2D.DrawLine(new Vector2(x        += mSampleWidth, y), new Vector2(x + mSampleWidth - mSamplesMargin, y), ToColor(21, 179, 89), 16f, CustomTexture3D);
        Drawing2D.DrawDashedLine(new Vector2(x  += mSampleWidth, y), new Vector2(x + mSampleWidth - mSamplesMargin, y), ToColor(175, 217, 141), 4f, 3);
        Drawing2D.DrawDashedLine(new Vector2(x  += mSampleWidth, y), new Vector2(x + mSampleWidth - mSamplesMargin, y), ToColor(248, 222, 104), 8f, 3);
        Drawing2D.DrawDashedLine(new Vector2(x  += mSampleWidth, y), new Vector2(x + mSampleWidth - mSamplesMargin, y), ToColor(255, 196, 126), 16f, 3);
        Drawing2D.DrawArrow(new Vector2(x       += mSampleWidth, y + 10), new Vector2(x + mSampleWidth - mSamplesMargin - 25, y - 10), ToColor(255, 112, 92), 4, 20, 25);
        Drawing2D.DrawDashedArrow(new Vector2(x += mSampleWidth, y - 10), new Vector2(x + mSampleWidth - mSamplesMargin - 25, y + 10), ToColor(232, 62, 83), 4, 20, 25, 3);
    }