Skip to main content
Inspiring
February 10, 2025
Answered

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

  • February 10, 2025
  • 1 reply
  • 321 views

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?

Correct answer Dirk Becker

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.

 

1 reply

Dirk BeckerCorrect answer
Legend
February 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.

 

Legend
February 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.

 

lyj2871Author
Inspiring
February 11, 2025

Could  you share some sample code? Thanks.