Line

Draws a line between two points using Bresenham's algorithm

intermediate
Since P00

Input Ports

Color

線の色(接続時パラメータより優先)

Color

Output Ports

Image

生成されたライン画像(透明背景)

Image

Parameters

NameTypeDefaultDescription
WidthInt64キャンバス幅(px)
HeightInt64キャンバス高さ(px)
X1Int0始点の X 座標
Y1Int0始点の Y 座標
X2Int63終点の X 座標
Y2Int63終点の Y 座標
ThicknessInt1線の太さ(px)
ColorColor線の色

キャンバスサイズ連動

ジェネレータノードとして、新規作成時に width / height がプロジェクトのキャンバスサイズ(_canvasWidth / _canvasHeight)に自動バインドされます。

状態width/height の値
default(新規作成時)プロジェクトキャンバスサイズにバインド(自動追従)
ユーザーが手入力 or バインド解除ローカル値(キャンバスサイズと独立)
インスペクターの 🔗 ボタンからバインドの解除・再登録ができます。

Algorithm

  • 1px 太さ: Bresenham のラインアルゴリズム(正確なピクセルライン)
  • 2px 以上: Bresenham の各点に円形ブラシを適用

Usage Examples

  • LineGenerate → Blend → Preview — 直線の描画
  • TimeSource → SineWave → Remap → LineGenerate(x2) → AnimationRender — 線の端点アニメーション
  • ColorPicker → LineGenerate(color) — optionalColorでライン描画
Line — PixPipeline Node Reference