Hello, I’m AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
To create an axial gradient with more than two colors in PDFNetC, you need to define multiple color stops along the gradient’s axis. This involves specifying the colors and their positions along the gradient line. PDFNet allows you to define custom color spaces and use them in your gradients.
Some things you can try:
Use the Shading class in PDFNet to define an axial shading pattern with multiple colors.
Create a color space that includes the colors red, yellow, and blue, and set their corresponding positions.
Use the CreateAxialShading method to define the start and end points of the gradient and include the color stops between them.
Apply this shading pattern to a shape or a path in your PDF document.
Apologies for the delay. You may define multiple color stops along the gradients axis by defining a stitching function. For more information on this, you can refer to the PDF SpecChapter 7.10.4 Type 3 (Stitiching) Functions.
I have attached some sample code below on how to do this. Note that you may stitch multiple sub functions together. PatternTest.cs (4.4 KB)