當前位置: 首頁>>代碼示例>>C#>>正文


C# pdf.PdfPatternPainter類代碼示例

本文整理匯總了C#中iTextSharp.text.pdf.PdfPatternPainter的典型用法代碼示例。如果您正苦於以下問題:C# PdfPatternPainter類的具體用法?C# PdfPatternPainter怎麽用?C# PdfPatternPainter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


PdfPatternPainter類屬於iTextSharp.text.pdf命名空間,在下文中一共展示了PdfPatternPainter類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: PatternColor

 /** Creates a color representing a pattern.
                            * @param painter the actual pattern
                            */    
 public PatternColor(PdfPatternPainter painter) : base(TYPE_PATTERN, .5f, .5f, .5f) {
     this.painter = painter;
 }
開發者ID:Niladri24dutta,項目名稱:itextsharp,代碼行數:6,代碼來源:PatternColor.cs

示例2: SetPatternStroke

 /** Sets the stroke color to a pattern. The pattern can be
  * colored or uncolored.
  * @param p the pattern
  */
 public virtual void SetPatternStroke(PdfPatternPainter p)
 {
     if (p.IsStencil()) {
         SetPatternStroke(p, p.DefaultColor);
         return;
     }
     CheckWriter();
     PageResources prs = PageResources;
     PdfName name = writer.AddSimplePattern(p);
     name = prs.AddPattern(name, p.IndirectReference);
     content.Append(PdfName.PATTERN.GetBytes()).Append(" CS ").Append(name.GetBytes()).Append(" SCN").Append_i(separator);
 }
開發者ID:HardcoreSoftware,項目名稱:iSecretary,代碼行數:16,代碼來源:PdfContentByte.cs

示例3: CreatePattern

 /**
  * Create a new uncolored tiling pattern.
  *
  * @param width the width of the pattern
  * @param height the height of the pattern
  * @param xstep the desired horizontal spacing between pattern cells.
  * May be either positive or negative, but not zero.
  * @param ystep the desired vertical spacing between pattern cells.
  * May be either positive or negative, but not zero.
  * @param color the default color. Can be <CODE>null</CODE>
  * @return the <CODE>PdfPatternPainter</CODE> where the pattern will be created
  */
 public PdfPatternPainter CreatePattern(float width, float height, float xstep, float ystep, BaseColor color)
 {
     CheckWriter();
     if ( xstep == 0.0f || ystep == 0.0f )
         throw new Exception(MessageLocalization.GetComposedMessage("xstep.or.ystep.can.not.be.zero"));
     PdfPatternPainter painter = new PdfPatternPainter(writer, color);
     painter.Width = width;
     painter.Height = height;
     painter.XStep = xstep;
     painter.YStep = ystep;
     writer.AddSimplePattern(painter);
     return painter;
 }
開發者ID:HardcoreSoftware,項目名稱:iSecretary,代碼行數:25,代碼來源:PdfContentByte.cs

示例4: AddSimplePattern

 internal PdfName AddSimplePattern(PdfPatternPainter painter)
 {
     PdfName name = (PdfName)documentPatterns[painter];
     if ( name == null ) {
         name = new PdfName("P" + patternNumber);
         ++patternNumber;
         documentPatterns[painter] = name;
     }
     return name;
 }
開發者ID:bmictech,項目名稱:iTextSharp,代碼行數:10,代碼來源:PdfWriter.cs

示例5: UncoloredPattern

 protected internal UncoloredPattern(PdfPatternPainter p, BaseColor color, float tint) : base(p) {
     this.color = color;
     this.tint = tint;
 }
開發者ID:NelsonSantos,項目名稱:fyiReporting-Android,代碼行數:4,代碼來源:PdfContentByte.cs

示例6: SetPatternStroke

 /**
 * @see com.lowagie.text.pdf.PdfContentByte#setPatternStroke(com.lowagie.text.pdf.PdfPatternPainter)
 */
 public override void SetPatternStroke(PdfPatternPainter p) {
     CheckNoColor();
     base.SetPatternStroke(p);
 }
開發者ID:nicecai,項目名稱:iTextSharp-4.1.6,代碼行數:7,代碼來源:PdfPatternPainter.cs

示例7: SetPatternFill

 /**
 * @see com.lowagie.text.pdf.PdfContentByte#setPatternFill(com.lowagie.text.pdf.PdfPatternPainter, java.awt.Color, float)
 */
 public override void SetPatternFill(PdfPatternPainter p, BaseColor color, float tint)
 {
     CheckNoColor();
     base.SetPatternFill(p, color, tint);
 }
開發者ID:mapo80,項目名稱:iTextSharp-Monotouch,代碼行數:8,代碼來源:PdfPatternPainter.cs

示例8: CreatePattern

 /**
  * Create a new uncolored tiling pattern.
  *
  * @param width the width of the pattern
  * @param height the height of the pattern
  * @param xstep the desired horizontal spacing between pattern cells.
  * May be either positive or negative, but not zero.
  * @param ystep the desired vertical spacing between pattern cells.
  * May be either positive or negative, but not zero.
  * @param color the default color. Can be <CODE>null</CODE>
  * @return the <CODE>PdfPatternPainter</CODE> where the pattern will be created
  */
 public PdfPatternPainter CreatePattern(float width, float height, float xstep, float ystep, Color color)
 {
     CheckWriter();
     if ( xstep == 0.0f || ystep == 0.0f )
         throw new Exception("XStep or YStep can not be ZERO.");
     PdfPatternPainter painter = new PdfPatternPainter(writer, color);
     painter.Width = width;
     painter.Height = height;
     painter.XStep = xstep;
     painter.YStep = ystep;
     writer.AddSimplePattern(painter);
     return painter;
 }
開發者ID:JamieMellway,項目名稱:iTextSharpLGPL-Monotouch,代碼行數:25,代碼來源:PdfContentByte.cs

示例9: SetPatternFill

 /** Sets the fill color to an uncolored pattern.
  * @param p the pattern
  * @param color the color of the pattern
  * @param tint the tint if the color is a spot color, ignored otherwise
  */
 public virtual void SetPatternFill(PdfPatternPainter p, Color color, float tint)
 {
     CheckWriter();
     if (!p.IsStencil())
         throw new Exception("An uncolored pattern was expected.");
     PageResources prs = PageResources;
     PdfName name = writer.AddSimplePattern(p);
     name = prs.AddPattern(name, p.IndirectReference);
     ColorDetails csDetail = writer.AddSimplePatternColorspace(color);
     PdfName cName = prs.AddColor(csDetail.ColorName, csDetail.IndirectReference);
     content.Append(cName.GetBytes()).Append(" cs").Append_i(separator);
     OutputColorNumbers(color, tint);
     content.Append(' ').Append(name.GetBytes()).Append(" scn").Append_i(separator);
 }
開發者ID:JamieMellway,項目名稱:iTextSharpLGPL-Monotouch,代碼行數:19,代碼來源:PdfContentByte.cs


注:本文中的iTextSharp.text.pdf.PdfPatternPainter類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。