元編程參考文件

簡單形狀影像

23 個節點

本頁內容 23

繪製圓形

函數

Draws a circle with the specified radius.

簽名
繪製圓形 -> Pixel Image
    半徑: 整數
    填充顏色: 可選顏色
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    內邊距: 低精度數字
    抗鋸齒: 真否
PixelImage DrawCircleShape(
    int radius,
    ColorElement? fillColor,
    ColorElement? strokeColor,
    float strokeWidth = 0f,
    ColorElement? backgroundColor,
    float padding = 0f,
    bool antialias = true)

參數

名稱型別預設值說明
半徑整數—The radius of the circle.
填充顏色可選顏色—
描邊顏色可選顏色—
描邊寬度低精度數字0
背景顏色可選顏色—
內邊距低精度數字0
抗鋸齒真否True

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製圓錐幾何體

函數

此節點沒有文件說明。

簽名
繪製圓錐幾何體 -> Pixel Image
    寬度: 數字
    高度: 數字
    深度: 數字
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    內邊距: 低精度數字
    填充顏色: 可選顏色
    抗鋸齒: 真否
PixelImage DrawConeGeometry(
    double width = 512,
    double height = 640,
    double depth = 220,
    ColorElement? strokeColor,
    float strokeWidth = 3f,
    ColorElement? backgroundColor,
    float padding = 32f,
    ColorElement? fillColor,
    bool antialias = true)

參數

名稱型別預設值說明
寬度數字512
高度數字640
深度數字220
描邊顏色可選顏色—
描邊寬度低精度數字3
背景顏色可選顏色—
內邊距低精度數字32
填充顏色可選顏色—
抗鋸齒真否True

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製立方體幾何體

函數

此節點沒有文件說明。

簽名
繪製立方體幾何體 -> Pixel Image
    大小: 數字
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    內邊距: 低精度數字
    填充面: 真否
    面填充顏色: 可選顏色
    抗鋸齒: 真否
PixelImage DrawCubeGeometry(
    double size = 512,
    ColorElement? strokeColor,
    float strokeWidth = 3f,
    ColorElement? backgroundColor,
    float padding = 32f,
    bool fillFaces = false,
    ColorElement? faceFillColor,
    bool antialias = true)

參數

名稱型別預設值說明
大小數字512
描邊顏色可選顏色—
描邊寬度低精度數字3
背景顏色可選顏色—
內邊距低精度數字32
填充面真否False
面填充顏色可選顏色—
抗鋸齒真否True

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製長方體幾何體

函數

此節點沒有文件說明。

簽名
繪製長方體幾何體 -> Pixel Image
    寬度: 數字
    高度: 數字
    深度: 數字
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    內邊距: 低精度數字
    填充面: 真否
    面填充顏色: 可選顏色
    抗鋸齒: 真否
PixelImage DrawCuboidGeometry(
    double width = 640,
    double height = 420,
    double depth = 260,
    ColorElement? strokeColor,
    float strokeWidth = 3f,
    ColorElement? backgroundColor,
    float padding = 32f,
    bool fillFaces = false,
    ColorElement? faceFillColor,
    bool antialias = true)

參數

名稱型別預設值說明
寬度數字640
高度數字420
深度數字260
描邊顏色可選顏色—
描邊寬度低精度數字3
背景顏色可選顏色—
內邊距低精度數字32
填充面真否False
面填充顏色可選顏色—
抗鋸齒真否True

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製曲線

函數

Draws (closed) curves/polygons.

簽名
繪製曲線 -> Pixel Image
    形狀: GeometryDrawShapesCollection
    輪廓: 顏色
    填充: 顏色
    背景: 顏色
    繪製填充: 真否
    輪廓粗細: 整數
    寬度: 整數
    高度: 整數
PixelImage DrawCurves(
    GeometryDrawShapesCollection shapes,
    ColorElement outline,
    ColorElement fill,
    ColorElement background,
    bool drawFill,
    int outlineThickness = 3,
    int width = 512,
    int height = 512)

參數

名稱型別預設值說明
形狀GeometryDrawShapesCollection—
輪廓顏色—
填充顏色—
背景顏色—
繪製填充真否—
輪廓粗細整數3
寬度整數512How many pixels wide the picture is; the frame the shapes were drawn in covers the whole of it.
高度整數512How many pixels tall the picture is.

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製圓柱幾何體

函數

此節點沒有文件說明。

簽名
繪製圓柱幾何體 -> Pixel Image
    寬度: 數字
    高度: 數字
    深度: 數字
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    內邊距: 低精度數字
    填充顏色: 可選顏色
    抗鋸齒: 真否
PixelImage DrawCylinderGeometry(
    double width = 512,
    double height = 640,
    double depth = 220,
    ColorElement? strokeColor,
    float strokeWidth = 3f,
    ColorElement? backgroundColor,
    float padding = 32f,
    ColorElement? fillColor,
    bool antialias = true)

參數

名稱型別預設值說明
寬度數字512
高度數字640
深度數字220
描邊顏色可選顏色—
描邊寬度低精度數字3
背景顏色可選顏色—
內邊距低精度數字32
填充顏色可選顏色—
抗鋸齒真否True

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製距離場

函數

Draws shapes filled as distance fields.

簽名
繪製距離場 -> Pixel Image
    形狀: GeometryDrawShapesCollection
    正向: 顏色
    負向: 顏色
    方向: DistanceFieldDirection
    衰減: DistanceFieldFalloffType
    衰減距離: 整數
    寬度: 整數
    高度: 整數
PixelImage DrawDistanceFields(
    GeometryDrawShapesCollection shapes,
    ColorElement positive,
    ColorElement negative,
    DistanceFieldDirection direction,
    DistanceFieldFalloffType falloff,
    int falloffDistance = 15,
    int width = 512,
    int height = 512)

參數

名稱型別預設值說明
形狀GeometryDrawShapesCollection—
正向顏色—
負向顏色—
方向DistanceFieldDirection—
衰減DistanceFieldFalloffType—
衰減距離整數15How far the field falls off, in the picture's pixels.
寬度整數512How many pixels wide the picture is; the frame the shapes were drawn in covers the whole of it.
高度整數512How many pixels tall the picture is.

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製橢圓

函數

Draws an ellipse within the specified width and height.

簽名
繪製橢圓 -> Pixel Image
    寬度: 整數
    高度: 整數
    填充顏色: 可選顏色
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    內邊距: 低精度數字
    旋轉角度(度): 低精度數字
    抗鋸齒: 真否
PixelImage DrawEllipseShape(
    int width,
    int height,
    ColorElement? fillColor,
    ColorElement? strokeColor,
    float strokeWidth = 0f,
    ColorElement? backgroundColor,
    float padding = 0f,
    float rotationDegrees = 0f,
    bool antialias = true)

參數

名稱型別預設值說明
寬度整數—
高度整數—
填充顏色可選顏色—
描邊顏色可選顏色—
描邊寬度低精度數字0
背景顏色可選顏色—
內邊距低精度數字0
旋轉角度(度)低精度數字0
抗鋸齒真否True

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製等邊三角形

函數

Draws an equilateral triangle within the specified dimensions and optionally labels edges and angles.

簽名
繪製等邊三角形 -> Pixel Image
    寬度: 整數
    高度: 整數
    向左或向右: 真否
    顯示邊名稱: 真否
    顯示角標記: 真否
    頂點名稱: 文字
    填充顏色: 可選顏色
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    內邊距: 低精度數字
    旋轉角度(度): 低精度數字
    標籤字型大小: 整數
    標籤顏色: 可選顏色
    抗鋸齒: 真否
PixelImage DrawEquilateralTriangleShape(
    int width,
    int height,
    bool leftOrRight = true,
    bool showEdgeNames = false,
    bool showAngleSymbols = false,
    string vertexNames = "ABC",
    ColorElement? fillColor,
    ColorElement? strokeColor,
    float strokeWidth = 0f,
    ColorElement? backgroundColor,
    float padding = 0f,
    float rotationDegrees = 0f,
    int labelFontSize = 14,
    ColorElement? labelColor,
    bool antialias = true)

參數

名稱型別預設值說明
寬度整數—The width of the drawing area.
高度整數—The height of the drawing area.
向左或向右真否TrueIf true, the triangle is left-aligned; if false, it is right-aligned.
顯示邊名稱真否FalseIf set to true, labels the vertices with letters.
顯示角標記真否FalseIf set to true, labels the angles with their measures.
頂點名稱文字ABC
填充顏色可選顏色—
描邊顏色可選顏色—
描邊寬度低精度數字0
背景顏色可選顏色—
內邊距低精度數字0
旋轉角度(度)低精度數字0
標籤字型大小整數14
標籤顏色可選顏色—
抗鋸齒真否True

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製六邊形

函數

過載 1/2

簽名
繪製六邊形 -> Pixel Image
    半徑: 數字
    填充顏色: 可選顏色
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    內邊距: 低精度數字
    起始角度(度): 低精度數字
    旋轉角度(度): 低精度數字
    抗鋸齒: 真否
PixelImage DrawHexagonShape(
    double radius,
    ColorElement? fillColor,
    ColorElement? strokeColor,
    float strokeWidth = 0f,
    ColorElement? backgroundColor,
    float padding = 0f,
    float startAngleDegrees = -90f,
    float rotationDegrees = 0f,
    bool antialias = true)

Draws a regular hexagon inscribed in a circle with the specified radius.

參數

名稱型別預設值說明
半徑數字—The radius of the circumscribed circle.
填充顏色可選顏色—
描邊顏色可選顏色—
描邊寬度低精度數字0
背景顏色可選顏色—
內邊距低精度數字0
起始角度(度)低精度數字-90
旋轉角度(度)低精度數字0
抗鋸齒真否True

返回

結果Pixel Image

過載 2/2

簽名
繪製六邊形 -> Pixel Image
    寬度: 整數
    高度: 整數
    填充顏色: 可選顏色
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    內邊距: 低精度數字
    起始角度(度): 低精度數字
    旋轉角度(度): 低精度數字
    抗鋸齒: 真否
PixelImage DrawHexagonShape(
    int width,
    int height,
    ColorElement? fillColor,
    ColorElement? strokeColor,
    float strokeWidth = 0f,
    ColorElement? backgroundColor,
    float padding = 0f,
    float startAngleDegrees = -90f,
    float rotationDegrees = 0f,
    bool antialias = true)

Draws a regular hexagon that fits within the specified width and height.

參數

名稱型別預設值說明
寬度整數—The width of the drawing area.
高度整數—The height of the drawing area.
填充顏色可選顏色—
描邊顏色可選顏色—
描邊寬度低精度數字0
背景顏色可選顏色—
內邊距低精度數字0
起始角度(度)低精度數字-90
旋轉角度(度)低精度數字0
抗鋸齒真否True

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製線段

函數

Draws a line segment.

簽名
繪製線段 -> Pixel Image
    寬度: 整數
    高度: 整數
    X1: 低精度數字
    Y1: 低精度數字
    X2: 低精度數字
    Y2: 低精度數字
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    抗鋸齒: 真否
    線帽: SKStrokeCap
PixelImage DrawLineShape(
    int width,
    int height,
    float x1,
    float y1,
    float x2,
    float y2,
    ColorElement? strokeColor,
    float strokeWidth = 2f,
    ColorElement? backgroundColor,
    bool antialias = true,
    SKStrokeCap strokeCap = SKStrokeCap.Round)

參數

名稱型別預設值說明
寬度整數—
高度整數—
X1低精度數字—
Y1低精度數字—
X2低精度數字—
Y2低精度數字—
描邊顏色可選顏色—
描邊寬度低精度數字2
背景顏色可選顏色—
抗鋸齒真否True
線帽SKStrokeCapRound

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製卵形

函數

Draws an oval with the specified major and minor radii.

簽名
繪製卵形 -> Pixel Image
    主半徑: 整數
    次半徑: 整數
    填充顏色: 可選顏色
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    內邊距: 低精度數字
    旋轉角度(度): 低精度數字
    抗鋸齒: 真否
PixelImage DrawOvalShape(
    int majorRadius,
    int minorRadius,
    ColorElement? fillColor,
    ColorElement? strokeColor,
    float strokeWidth = 0f,
    ColorElement? backgroundColor,
    float padding = 0f,
    float rotationDegrees = 0f,
    bool antialias = true)

參數

名稱型別預設值說明
主半徑整數—The major radius (half of the width) of the oval.
次半徑整數—The minor radius (half of the height) of the oval.
填充顏色可選顏色—
描邊顏色可選顏色—
描邊寬度低精度數字0
背景顏色可選顏色—
內邊距低精度數字0
旋轉角度(度)低精度數字0
抗鋸齒真否True

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製五邊形

函數

過載 1/2

簽名
繪製五邊形 -> Pixel Image
    半徑: 數字
    填充顏色: 可選顏色
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    內邊距: 低精度數字
    起始角度(度): 低精度數字
    旋轉角度(度): 低精度數字
    抗鋸齒: 真否
PixelImage DrawPentagonShape(
    double radius,
    ColorElement? fillColor,
    ColorElement? strokeColor,
    float strokeWidth = 0f,
    ColorElement? backgroundColor,
    float padding = 0f,
    float startAngleDegrees = -90f,
    float rotationDegrees = 0f,
    bool antialias = true)

Draws a regular pentagon inscribed in a circle with the specified radius.

參數

名稱型別預設值說明
半徑數字—The radius of the circumscribed circle.
填充顏色可選顏色—
描邊顏色可選顏色—
描邊寬度低精度數字0
背景顏色可選顏色—
內邊距低精度數字0
起始角度(度)低精度數字-90
旋轉角度(度)低精度數字0
抗鋸齒真否True

返回

結果Pixel Image

過載 2/2

簽名
繪製五邊形 -> Pixel Image
    寬度: 整數
    高度: 整數
    填充顏色: 可選顏色
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    內邊距: 低精度數字
    起始角度(度): 低精度數字
    旋轉角度(度): 低精度數字
    抗鋸齒: 真否
PixelImage DrawPentagonShape(
    int width,
    int height,
    ColorElement? fillColor,
    ColorElement? strokeColor,
    float strokeWidth = 0f,
    ColorElement? backgroundColor,
    float padding = 0f,
    float startAngleDegrees = -90f,
    float rotationDegrees = 0f,
    bool antialias = true)

Draws a regular pentagon that fits within the specified width and height.

參數

名稱型別預設值說明
寬度整數—The width of the drawing area.
高度整數—The height of the drawing area.
填充顏色可選顏色—
描邊顏色可選顏色—
描邊寬度低精度數字0
背景顏色可選顏色—
內邊距低精度數字0
起始角度(度)低精度數字-90
旋轉角度(度)低精度數字0
抗鋸齒真否True

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製多邊形

函數

Draws a regular polygon with the specified number of sides inscribed within the given width and height.

簽名
繪製多邊形 -> Pixel Image
    寬度: 整數
    高度: 整數
    邊數: 整數
    填充顏色: 可選顏色
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    內邊距: 低精度數字
    起始角度(度): 低精度數字
    旋轉角度(度): 低精度數字
    適應方式: Polygon Fit Mode
    抗鋸齒: 真否
PixelImage DrawPolygonShape(
    int width,
    int height,
    int sides,
    ColorElement? fillColor,
    ColorElement? strokeColor,
    float strokeWidth = 0f,
    ColorElement? backgroundColor,
    float padding = 0f,
    float startAngleDegrees = -90f,
    float rotationDegrees = 0f,
    SimpleShapeImages.PolygonFitMode fitMode = PolygonFitMode.FitWidthAndHeight,
    bool antialias = true)

參數

名稱型別預設值說明
寬度整數—The width of the drawing area.
高度整數—The height of the drawing area.
邊數整數—The number of sides of the polygon (minimum 3).
填充顏色可選顏色—
描邊顏色可選顏色—
描邊寬度低精度數字0
背景顏色可選顏色—
內邊距低精度數字0
起始角度(度)低精度數字-90
旋轉角度(度)低精度數字0
適應方式Polygon Fit Mode適應寬高
抗鋸齒真否True

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製稜錐幾何體

函數

此節點沒有文件說明。

簽名
繪製稜錐幾何體 -> Pixel Image
    寬度: 數字
    高度: 數字
    深度: 數字
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    內邊距: 低精度數字
    填充面: 真否
    面填充顏色: 可選顏色
    抗鋸齒: 真否
PixelImage DrawPyramidGeometry(
    double width = 640,
    double height = 500,
    double depth = 320,
    ColorElement? strokeColor,
    float strokeWidth = 3f,
    ColorElement? backgroundColor,
    float padding = 32f,
    bool fillFaces = false,
    ColorElement? faceFillColor,
    bool antialias = true)

參數

名稱型別預設值說明
寬度數字640
高度數字500
深度數字320
描邊顏色可選顏色—
描邊寬度低精度數字3
背景顏色可選顏色—
內邊距低精度數字32
填充面真否False
面填充顏色可選顏色—
抗鋸齒真否True

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製四邊形

函數

Draws a quadrilateral with the specified width, height, and slanted angle.

簽名
繪製四邊形 -> Pixel Image
    寬度: 整數
    高度: 整數
    角度(度): 數字
    填充顏色: 可選顏色
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    內邊距: 低精度數字
    旋轉角度(度): 低精度數字
    抗鋸齒: 真否
PixelImage DrawQuadrilateralShape(
    int width,
    int height,
    double angleInDegrees = 12,
    ColorElement? fillColor,
    ColorElement? strokeColor,
    float strokeWidth = 0f,
    ColorElement? backgroundColor,
    float padding = 0f,
    float rotationDegrees = 0f,
    bool antialias = true)

參數

名稱型別預設值說明
寬度整數—The width of the drawing area.
高度整數—The height of the drawing area.
角度(度)數字12The angle in degrees to slant one side.
填充顏色可選顏色—
描邊顏色可選顏色—
描邊寬度低精度數字0
背景顏色可選顏色—
內邊距低精度數字0
旋轉角度(度)低精度數字0
抗鋸齒真否True

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製矩形

函數

Draws a rectangle with the specified width and height.

簽名
繪製矩形 -> Pixel Image
    寬度: 整數
    高度: 整數
    填充顏色: 可選顏色
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    內邊距: 低精度數字
    圓角半徑: 低精度數字
    旋轉角度(度): 低精度數字
    抗鋸齒: 真否
PixelImage DrawRectangleShape(
    int width,
    int height,
    ColorElement? fillColor,
    ColorElement? strokeColor,
    float strokeWidth = 0f,
    ColorElement? backgroundColor,
    float padding = 0f,
    float cornerRadius = 0f,
    float rotationDegrees = 0f,
    bool antialias = true)

參數

名稱型別預設值說明
寬度整數—The width of the rectangle.
高度整數—The height of the rectangle.
填充顏色可選顏色—
描邊顏色可選顏色—
描邊寬度低精度數字0
背景顏色可選顏色—
內邊距低精度數字0
圓角半徑低精度數字0
旋轉角度(度)低精度數字0
抗鋸齒真否True

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製直角三角形

函數

Draws a right triangle with the specified dimensions and optional edge and angle labels.

過載 1/2

簽名
繪製直角三角形 -> Pixel Image
    寬度: 整數
    高度: 整數
    直角位置: Right Triangle Corner
    顯示邊名稱: 真否
    顯示角標記: 真否
    頂點名稱: 文字
    填充顏色: 可選顏色
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    內邊距: 低精度數字
    旋轉角度(度): 低精度數字
    標籤字型大小: 整數
    標籤顏色: 可選顏色
    抗鋸齒: 真否
PixelImage DrawRightTriangleShape(
    int width,
    int height,
    SimpleShapeImages.RightTriangleCorner rightAngleCorner = RightTriangleCorner.BottomLeft,
    bool showEdgeNames = false,
    bool showAngleSymbols = false,
    string vertexNames = "ABC",
    ColorElement? fillColor,
    ColorElement? strokeColor,
    float strokeWidth = 0f,
    ColorElement? backgroundColor,
    float padding = 0f,
    float rotationDegrees = 0f,
    int labelFontSize = 14,
    ColorElement? labelColor,
    bool antialias = true)

參數

名稱型別預設值說明
寬度整數—The width of the drawing area.
高度整數—The height of the drawing area.
直角位置Right Triangle Corner左下The corner where the right angle is placed.
顯示邊名稱真否FalseIf set to true, labels the vertices with letters.
顯示角標記真否FalseIf set to true, labels the right angle with its measure.
頂點名稱文字ABC
填充顏色可選顏色—
描邊顏色可選顏色—
描邊寬度低精度數字0
背景顏色可選顏色—
內邊距低精度數字0
旋轉角度(度)低精度數字0
標籤字型大小整數14
標籤顏色可選顏色—
抗鋸齒真否True

返回

結果Pixel Image

過載 2/2

簽名
繪製直角三角形 -> Pixel Image
    寬度: 整數
    高度: 整數
    向左或向右: 真否
    顯示邊名稱: 真否
    顯示角標記: 真否
PixelImage DrawRightTriangleShape(
    int width,
    int height,
    bool leftOrRight,
    bool showEdgeNames,
    bool showAngleSymbols)

參數

名稱型別預設值說明
寬度整數—The width of the drawing area.
高度整數—The height of the drawing area.
向左或向右真否—If true, the right angle is at the left side; if false, it is at the right side.
顯示邊名稱真否—If set to true, labels the vertices with letters.
顯示角標記真否—If set to true, labels the right angle with its measure.

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製球體幾何體

函數

Draw a lit 3D sphere.

簽名
繪製球體幾何體 -> Pixel Image
    寬度: 數字
    高度: 數字
    半徑: 數字
PixelImage DrawSphereGeometry(
    double width = 1024,
    double height = 1024,
    double radius = 1)

參數

名稱型別預設值說明
寬度數字1024Width of image
高度數字1024Height of image
半徑數字1Radius of sphere in 3D space.

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製正方形

函數

Draws a square with the specified size.

簽名
繪製正方形 -> Pixel Image
    大小: 整數
    填充顏色: 可選顏色
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    內邊距: 低精度數字
    圓角半徑: 低精度數字
    旋轉角度(度): 低精度數字
    抗鋸齒: 真否
PixelImage DrawSquareShape(
    int size,
    ColorElement? fillColor,
    ColorElement? strokeColor,
    float strokeWidth = 0f,
    ColorElement? backgroundColor,
    float padding = 0f,
    float cornerRadius = 0f,
    float rotationDegrees = 0f,
    bool antialias = true)

參數

名稱型別預設值說明
大小整數—The length of each side of the square.
填充顏色可選顏色—
描邊顏色可選顏色—
描邊寬度低精度數字0
背景顏色可選顏色—
內邊距低精度數字0
圓角半徑低精度數字0
旋轉角度(度)低精度數字0
抗鋸齒真否True

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製星形

函數

Draws a star polygon.

簽名
繪製星形 -> Pixel Image
    寬度: 整數
    高度: 整數
    點: 整數
    內半徑比例: 低精度數字
    填充顏色: 可選顏色
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    內邊距: 低精度數字
    起始角度(度): 低精度數字
    旋轉角度(度): 低精度數字
    抗鋸齒: 真否
PixelImage DrawStarShape(
    int width,
    int height,
    int points = 5,
    float innerRadiusRatio = 0.45f,
    ColorElement? fillColor,
    ColorElement? strokeColor,
    float strokeWidth = 0f,
    ColorElement? backgroundColor,
    float padding = 0f,
    float startAngleDegrees = -90f,
    float rotationDegrees = 0f,
    bool antialias = true)

參數

名稱型別預設值說明
寬度整數—
高度整數—
點整數5
內半徑比例低精度數字0.45
填充顏色可選顏色—
描邊顏色可選顏色—
描邊寬度低精度數字0
背景顏色可選顏色—
內邊距低精度數字0
起始角度(度)低精度數字-90
旋轉角度(度)低精度數字0
抗鋸齒真否True

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製文字

函數

Handles both single line and multi line

簽名
繪製文字 -> Pixel Image
    文字: 文字
    內邊距: 整數
    字型大小: 整數
    字型族: 文字
    顏色: 可選顏色
    文字對齊: SKTextAlign
    背景: 可選顏色
    行距: 低精度數字
    半粗體: 真否
    斜體: 真否
    抗鋸齒: 真否
PixelImage DrawText(
    string text,
    int padding = 10,
    int fontSize = 46,
    string fontFamily = "Verdana",
    ColorElement? color,
    SKTextAlign textAlign = SKTextAlign.Center,
    ColorElement? background,
    float lineSpacing = 1.15f,
    bool semibold = true,
    bool italic = true,
    bool antialias = true)

參數

名稱型別預設值說明
文字文字—
內邊距整數10
字型大小整數46
字型族文字Verdana
顏色可選顏色—
文字對齊SKTextAlignCenter
背景可選顏色—
行距低精度數字1.15
半粗體真否True
斜體真否True
抗鋸齒真否True

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理

繪製三角形

函數

Draws a triangle with the specified width and height.

簽名
繪製三角形 -> Pixel Image
    寬度: 整數
    高度: 整數
    方向: Triangle Direction
    填充顏色: 可選顏色
    描邊顏色: 可選顏色
    描邊寬度: 低精度數字
    背景顏色: 可選顏色
    內邊距: 低精度數字
    旋轉角度(度): 低精度數字
    抗鋸齒: 真否
PixelImage DrawTriangleShape(
    int width,
    int height,
    SimpleShapeImages.TriangleDirection direction = TriangleDirection.Up,
    ColorElement? fillColor,
    ColorElement? strokeColor,
    float strokeWidth = 0f,
    ColorElement? backgroundColor,
    float padding = 0f,
    float rotationDegrees = 0f,
    bool antialias = true)

參數

名稱型別預設值說明
寬度整數—The width of the drawing area.
高度整數—The height of the drawing area.
方向Triangle Direction向上
填充顏色可選顏色—
描邊顏色可選顏色—
描邊寬度低精度數字0
背景顏色可選顏色—
內邊距低精度數字0
旋轉角度(度)低精度數字0
抗鋸齒真否True

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
簡單形狀影像
所屬包
影像處理