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

Can someone explain the usage of the setgradient function in the IGraphicsPort interface?

Explorer ,
Feb 09, 2025 Feb 09, 2025

In the IGraphicsPort interface, there is a virtual function:

 

virtual void setgradient(AGMGradient *agmGrad, const PMMatrix& grMatrix,
                         const PMReal &xOrig, const PMReal &yOrig,
                         const PMReal &len, const PMReal &ang,
                         const PMReal &hiliteLen, const PMReal &hiliteAng) = 0;

 

I couldn't find a precise definition of the first parameter, AGMGradient *agmGrad. I assume that this requires a pointer to some other object, but how should this object be created? What exactly needs to be passed in?

TOPICS
SDK
140
Translate
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

correct answers 1 Correct answer

Guide , Feb 10, 2025 Feb 10, 2025

AGM is an old library exposed via wrappers ony, the actual AGM* structures remain opaque / forward declarations, similar to CT* structures. Related methods are in a private (no headers provided) gradient utils class.

 

Please file a feature request in developer prerelease to expose the header.

 

Translate
Guide ,
Feb 10, 2025 Feb 10, 2025

AGM is an old library exposed via wrappers ony, the actual AGM* structures remain opaque / forward declarations, similar to CT* structures. Related methods are in a private (no headers provided) gradient utils class.

 

Please file a feature request in developer prerelease to expose the header.

 

Translate
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 ,
Feb 10, 2025 Feb 10, 2025

I should have checked the SDK first. Above was from 2018 when I last tried to examine such an object.

Gradients are a rendering object similar to color swatches, tint etc., applying such a rendering object should do.

I'd first try IGradientFillInstall though.

 

Translate
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 ,
Feb 10, 2025 Feb 10, 2025
LATEST

Could  you share some sample code? Thanks.

Translate
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