jingwood / jingwood/d2dlib

Parameter missing in DrawBeziers

Open
#53 1 comment 0 reactions 0 assignees View on GitHub
bug todo
Dominant language
C#
Stars
261
Forks
48
PR merge metrics
No merged PRs in 30d

Description

I believe there is a missing parameter in D2DGraphics.DrawBeziers - first curve starting point. The D2DBezierSegment contains only two control points and end path point (while you need 4 points for cubic bezier). You use the first control point also as a first main point of cubic bezier:

```
context->factory->CreatePathGeometry(&path);
path->Open(&sink);
//sink->SetFillMode(D2D1_FILL_MODE_WINDING);
sink->BeginFigure(bezierSegments[0].point1, D2D1_FIGURE_BEGIN_FILLED); //error - here you should add additional parameter as starting point
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at D2DGraphics.DrawBeziers and inspect how D2DBezierSegment values are passed to CreatePathGeometry and BeginFigure. Confirm whether the first control point is incorrectly used as the cubic Bézier starting point, then verify that the drawing path uses the intended four points and preserves existing rendering behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.