Highlighted

Detecting corner type of frame

Explorer ,
Feb 26, 2020

Copy link to clipboard

Copied

Hi,

I would like to detect corner types, but I can only detect the top left corner.

This is my code so far:

 

InterfacePtr<IGraphicFrameData> theImageItemFrame;

 

InterfacePtr<IGraphicStyleDescriptor> myTest3((IGraphicStyleDescriptor *)theImageItemFrame->QueryInterface(IID_IGRAPHICSTYLE_DESCRIPTOR));

 

ClassID pathCornerClassID = kInvalidClass;

 

if (Utils<IGraphicAttributeUtils>()->GetCornerImplementation(pathCornerClassID, myTest3) == kSuccess)

{

    switch (pathCornerClassID.Get())
    {

default:
break;

case kCornerServiceBoss:
CAlert::InformationAlert("type6");
break;

case kRoundedCornerBoss:
CAlert::InformationAlert("type7");
break;

case kInverseRoundedCornerBoss:
CAlert::InformationAlert("type8");
break;

case kInsetCornerBoss:
CAlert::InformationAlert("type9");
break;

case kBevelCornerBoss:
CAlert::InformationAlert("type10");
break;

case kFancyCornerBoss:
CAlert::InformationAlert("type11");
break;

    }

}

 

Is it possible to detect the types for all corners of the frame? Do I need to iterate something?

For example, if I have my top left corner set to rounded,

the bottom right corner to fancy, etc. Please check out this screenshot:

 

corner-typescorner-types

TOPICS
How to, SDK

Views

144

Likes

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

Detecting corner type of frame

Explorer ,
Feb 26, 2020

Copy link to clipboard

Copied

Hi,

I would like to detect corner types, but I can only detect the top left corner.

This is my code so far:

 

InterfacePtr<IGraphicFrameData> theImageItemFrame;

 

InterfacePtr<IGraphicStyleDescriptor> myTest3((IGraphicStyleDescriptor *)theImageItemFrame->QueryInterface(IID_IGRAPHICSTYLE_DESCRIPTOR));

 

ClassID pathCornerClassID = kInvalidClass;

 

if (Utils<IGraphicAttributeUtils>()->GetCornerImplementation(pathCornerClassID, myTest3) == kSuccess)

{

    switch (pathCornerClassID.Get())
    {

default:
break;

case kCornerServiceBoss:
CAlert::InformationAlert("type6");
break;

case kRoundedCornerBoss:
CAlert::InformationAlert("type7");
break;

case kInverseRoundedCornerBoss:
CAlert::InformationAlert("type8");
break;

case kInsetCornerBoss:
CAlert::InformationAlert("type9");
break;

case kBevelCornerBoss:
CAlert::InformationAlert("type10");
break;

case kFancyCornerBoss:
CAlert::InformationAlert("type11");
break;

    }

}

 

Is it possible to detect the types for all corners of the frame? Do I need to iterate something?

For example, if I have my top left corner set to rounded,

the bottom right corner to fancy, etc. Please check out this screenshot:

 

corner-typescorner-types

TOPICS
How to, SDK

Views

145

Likes

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
Feb 26, 2020 0
Explorer ,
Sep 25, 2020

Copy link to clipboard

Copied

Is there no answer for this?

Would this be a valid direction to try to solve this:

InterfacePtr<IPathGeometry> pathGeometry;

PMPathPointList result;

pathGeometry->GetNthPath(0, result);

?

Thanks for any help.

 

Likes

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
Reply
Loading...
Sep 25, 2020 0
Advisor ,
Sep 27, 2020

Copy link to clipboard

Copied

I don't know about that util. Looking at the raw attributes, I see that kGraphicStyleCornerImplAttrBoss, kGraphicStyleLiveCornerBLImplAttrBoss, kGraphicStyleLiveCornerBRImplAttrBoss or kGraphicStyleLiveCornerTRImplAttrBoss each with Interface kGraphicStyleLiveCornerBLImplAttrBoss IID_IGRAPHICATTR_CLASSID have a value of kBevelCornerBoss etc.

 

Likes

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
Reply
Loading...
Sep 27, 2020 0
Advisor ,
Sep 27, 2020

Copy link to clipboard

Copied

Also, don't hard wire a mapping from those …CornerBoss ClassIDs to your own representation.

Service registry has a kPathCornerService, so apparently a plug-in could implement their own corner style.

Likes

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
Reply
Loading...
Sep 27, 2020 0
Explorer ,
Sep 28, 2020

Copy link to clipboard

Copied

Hi, I resolved the issue in another way.

I consider this issue to be closed.

Likes

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
Reply
Loading...
Sep 28, 2020 0
Adobe Community Professional ,
Sep 28, 2020

Copy link to clipboard

Copied

It would be helpful if you provided the solution that helped you as it could benefit other users in the future.

Likes

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
Reply
Loading...
Sep 28, 2020 0
Explorer ,
Sep 28, 2020

Copy link to clipboard

Copied

Hi,

 

I had to do some debugging work in my plugin, the issue was caused by using the wrong interface in combination with

frame content fitting. (You can't fit a frame in a frame). I changed it to the image-item which works.

So it was more a bug in my own code. I don't have a solution for the original question.

Likes

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
Reply
Loading...
Sep 28, 2020 0