• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

while retrieving stroke align type which is applied for a paths getting same type values adobe sdk

Explorer ,
Mar 12, 2023 Mar 12, 2023

Copy link to clipboard

Copied

Hi all,

I want to retrieve the stroke align type values which is applied for the different path.

 

sAIArt->SetArtUserAttr(art, kArtSelected, kArtSelected);

the above code i used to select the each path 

 

ai::uint32 strokeAlignType;

strokeAlignType = sAIPaintStyle->GetStrokeAlignmentFromSelection();

cout << "strokeAlignType = "<<strokeAlignType <<endl;

the above code i used to retrieve the stroke align type for the selected path.
but while retriving the property im getting same stroke align type value, which is applied for the first path.

 

can anyone help me to solve this solution.

 

Thanks

TOPICS
SDK

Views

241

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Mar 13, 2023 Mar 13, 2023

Copy link to clipboard

Copied

To get stroke-specific information and support multi-stroke/fill you'll need to parse the style -- that means AIStyleParser.h. All art has a style, even if you haven't applied a Graphics Style to it -- Graphic Styles are just named styles. When you apply colour or stroke properties to an art object, you are modifying it's anonymous style. So get the AIArtStyleHaadle for the AIArtHandle in question, create a style parser & parse the AIArtStyleHaadle. You can then iterate each stroke and/or fill. For some, you can get easy-to-access properties, but for others you'll need to get the dictionary that contains their stroke or fill parameters. You can use the AIBeauthifulStrokes.h functions to help.

 

You can find an example of iterating stroke & fill in InspectFillStrokeAndBlend() in the sample code samplecode/CodeSnippets/SnpGraphicStyle.cpp

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 14, 2023 Mar 14, 2023

Copy link to clipboard

Copied

LATEST

hi 

i tried the solution which you have menstioned , there i can get the basic stroke properties like cap, join, miter and width.

but didn't sloution to retrieve stroke align properties which is applied for the art object..

can i get example code to retrieve stroke align property which is applied for the art object...

 

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines