Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Trouble with ShadingType 4 (Gouraud Triangles)
  FAQ FAQ  Forum Search   Register Register  Login Login


Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

Trouble with ShadingType 4 (Gouraud Triangles)

 Post Reply Post Reply
Author
JimBlack View Drop Down
New Member
New Member
Avatar

Joined: 24 Nov 2016
Location: Colorado
Points: 1
Post Options Post Options   Quote JimBlack Quote  Post ReplyReply Direct Link To This Post Topic: Trouble with ShadingType 4 (Gouraud Triangles)
    Posted: 24 Nov 2016 at 4:24pm
Hi,
I am generating a PDF file and cannot get Shading Type 4 to work.  Here is my shading-pattern object in the PDF file that I generated:
 
12 0 obj   % PdfSharp.Pdf.Advanced.PdfShadingPattern
<<
  /Matrix [1 0 0 1 0 0]
  /PatternType 2
  /Shading
  <<
    /ColorSpace /DeviceRGB
    /DataSource [0 411 210.1 0 2 247 187.6 1 2 575 187.6 1 2 575 232.6 1 2 247 232.6 1 2 247 187.6 1]
    /Function
    <<
      /C0 [0 0.875 0]
      /C1 [0 0.169 0]
      /Domain [0 1]
      /FunctionType 2
      /N 1
    >>
    /ShadingType 4
  >>
  /Type /Pattern
>>
endobj
 
When I apply this shading to a simple rectangle in my PDF file, the rectangle is not rendered.  I've tried to render both in Adobe Acrobat Reader 2015 and in GSView 5.0 and get no rectangle in either case.  On the other hand, if I insert my shading function into a simple PostScript file, it works!   Also, when I replaced the Type 4 shading by ShadingType 2 (linear gradient) in my PDF file, the rectangle renders.  So I'm wondering if there is some magic incantation that I need to perform in order to have Type 4 shading render in a PDF file? 


Edited by JimBlack - 24 Nov 2016 at 4:30pm
Thanks...Jim
Back to Top
Sponsored Links


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.029 seconds.