You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is a BL::Path made of a simple BL::Arc of 120 degrees.
Then, from this Path I build a strokedPath with a given width (thickness)
As you can see, the stroked-path (p2) has a strange glitch, and it is made of 40 vertices (against 7 vertices of path p1).
Here's a test:
// ------------------------------------------------------------------
BLImage render(const BLContextCreateInfo& cci) {
BLImage img(256, 256, BL_FORMAT_PRGB32);
BLContext ctx(img, cci);
ctx.clearAll();
BLPath p1;
double r = 100.0;
double PI=3.1415;
double r1=r/5*4;
BLArc xa = BLArc(r,0,r1,r1,PI*2/3,PI*2/3);
p1.addArc(xa);
// create a dummyContext
// it requires a minimal dummyImage, too
// or you won't be able to set options (--> error INVALID_STATE)
BLImage dummyImage = BLImage(1,1, BL_FORMAT_A8);
Here is a BL::Path made of a simple BL::Arc of 120 degrees.
Then, from this Path I build a strokedPath with a given width (thickness)
As you can see, the stroked-path (p2) has a strange glitch, and it is made of 40 vertices (against 7 vertices of path p1).
Here's a test:
// ------------------------------------------------------------------
BLImage render(const BLContextCreateInfo& cci) {
BLImage img(256, 256, BL_FORMAT_PRGB32);
BLContext ctx(img, cci);
ctx.clearAll();
BLPath p1;
double r = 100.0;
double PI=3.1415;
BLContext dummyCtx( dummyImage );
dummyCtx.setStrokeWidth(r/6);
BLStrokeOptions opt;
BLPath p2;
p2.addStrokedPath(p1,dummyCtx.strokeOptions(),blDefaultApproximationOptions);
ctx.setTransform({1,0,0,1,100,100});
ctx.strokePath(p2, BLRgba32(0xFFFFFF00));
printf("p1 size is %ld\n", p1.size());
printf("p2 size is %ld\n", p2.size());
return img;
}
The text was updated successfully, but these errors were encountered: