Skip to main content
Rick E Johnson
Inspiring
July 12, 2022
Question

How to use WidthMarkerFlags in sAIBeautifulStrokes->SetCenteredWidthAtDistance()

  • July 12, 2022
  • 1 reply
  • 290 views

I'm having some trouble understanding the difference between the various WidthMarkerFlags for applying varied stroke widths with AIBeautifulStrokes. The different options all seem to produce the same results, but none of them are what I need. Here I've added a tinted blue line to show the 1-pt minimum stroke width I want, yet they all curve to make a narrower width of about .4 in the middle. 

 

 

Here's a portion of the code:

sAIBeautifulStrokes->SetCenteredWidthAtDistance(aArt, 0, 4, kCornerWidthMarker);
sAIBeautifulStrokes->SetCenteredWidthAtDistance(aArt, 0.25, 1, kCornerWidthMarker);
sAIBeautifulStrokes->SetCenteredWidthAtDistance(aArt, 0.75, 1, kCornerWidthMarker);
sAIBeautifulStrokes->SetCenteredWidthAtDistance(aArt, 1, 4, kCornerWidthMarker);

I'd expected kCornerWidthMarker to make a linear taper between markers, but it doesn't. In fact, I converted all of these paths to outlines and stacked them to find that they're all exactly alike -- the WidthMarkerFlags made no difference whatsoever! Am I using them wrong, or is this a bug?

 

This topic has been closed for replies.

1 reply

Anubhav M
Community Manager
Community Manager
August 1, 2022

Hello @Rick E Johnson,

 

Sorry for the late response. I hope the problem is resolved by now. If not, kindly try the developer console website (https://console.adobe.io/servicesandapis), select Illustrator from the product list, and you should be able to download the required documentation to learn more about the SDK.

 

Kindly update this thread if you need further assistance. We'd be happy to help.

 

Thanks,

Anubhav

Rick E Johnson
Inspiring
August 1, 2022

No, sorry, there is no resolution. I suspect this is a bug with no workaround. Thanks for getting back to me!