当前位置: 首页>>代码示例>>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;未经允许,请勿转载。