1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 09:16:01 +08:00

Fixed formatting, fixed dashed stroke style

This commit is contained in:
Thor Brigsted 2019-11-14 17:40:09 +01:00
parent ec9c5a99de
commit 4edcc3f099

View File

@ -178,16 +178,16 @@ namespace XNodeEditor {
// Coloring and bezier drawing.
int draw = 0;
Vector2 bezierPrevious = point_a;
for (int j = 1; j <= division; ++j)
{
for (int j = 1; j <= division; ++j) {
if (stroke == NoodleStroke.Dashed) {
draw++;
if (draw >= 2) draw = -2;
if (draw < 0) continue;
if (draw == 0) bezierPrevious = CalculateBezierPoint(point_a, tangent_a, tangent_b, point_b, (j - 1f) / (float) division);
}
if (i == length - 2)
Handles.color = gradient.Evaluate((j + 1f) / division);
Vector2 bezierNext = CalculateBezierPoint(point_a, tangent_a, tangent_b, point_b, j / (float)division);
Vector2 bezierNext = CalculateBezierPoint(point_a, tangent_a, tangent_b, point_b, j / (float) division);
DrawAAPolyLineNonAlloc(thickness, bezierPrevious, bezierNext);
bezierPrevious = bezierNext;
}