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


C# Rectangle.GetTop方法代碼示例

本文整理匯總了C#中iTextSharp.text.Rectangle.GetTop方法的典型用法代碼示例。如果您正苦於以下問題:C# Rectangle.GetTop方法的具體用法?C# Rectangle.GetTop怎麽用?C# Rectangle.GetTop使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在iTextSharp.text.Rectangle的用法示例。


在下文中一共展示了Rectangle.GetTop方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: CellLayout

// ---------------------------------------------------------------------------    
    /**
     * @see com.lowagie.text.pdf.PdfPCellEvent#cellLayout(
     * com.lowagie.text.pdf.PdfPCell,
     * com.lowagie.text.Rectangle, 
     * com.lowagie.text.pdf.PdfContentByte[]
     * )
     */
    public void CellLayout(PdfPCell cell, Rectangle rect, PdfContentByte[] cb)
    {
      parent.AddKid(kid);
      kid.SetWidget(
        new Rectangle(rect.GetLeft(padding), rect.GetBottom(padding),
        rect.GetRight(padding), rect.GetTop(padding)),
        PdfAnnotation.HIGHLIGHT_INVERT
      );
    }
開發者ID:kuujinbo,項目名稱:iTextInAction2Ed,代碼行數:17,代碼來源:ChildFieldEvent.cs

示例2: CellLayout

 /**
 * @see com.lowagie.text.pdf.PdfPCellEvent#cellLayout(com.lowagie.text.pdf.PdfPCell, com.lowagie.text.Rectangle, com.lowagie.text.pdf.PdfContentByte[])
 */
 virtual public void CellLayout(PdfPCell cell, Rectangle rect, PdfContentByte[] canvases) {
     if (cellField == null || (fieldWriter == null && parent == null)) throw new ArgumentException(MessageLocalization.GetComposedMessage("you.have.used.the.wrong.constructor.for.this.fieldpositioningevents.class"));
     cellField.Put(PdfName.RECT, new PdfRectangle(rect.GetLeft(padding), rect.GetBottom(padding), rect.GetRight(padding), rect.GetTop(padding)));
     if (parent == null)
         fieldWriter.AddAnnotation(cellField);
     else
         parent.AddKid(cellField);
 }
開發者ID:jagruti23,項目名稱:itextsharp,代碼行數:11,代碼來源:FieldPositioningEvents.cs

示例3: OnGenericTag

 /**
 * @see com.lowagie.text.pdf.PdfPageEvent#onGenericTag(com.lowagie.text.pdf.PdfWriter, com.lowagie.text.Document, com.lowagie.text.Rectangle, java.lang.String)
 */
 public override void OnGenericTag(PdfWriter writer, Document document,
         Rectangle rect, String text) {
     rect.Bottom = rect.Bottom - 3;
     PdfFormField field;
     genericChunkFields.TryGetValue(text, out field);
     if (field == null) {
         TextField tf = new TextField(writer, new Rectangle(rect.GetLeft(padding), rect.GetBottom(padding), rect.GetRight(padding), rect.GetTop(padding)), text);
         tf.FontSize = 14;
         field = tf.GetTextField();
     }
     else {
         field.Put(PdfName.RECT,  new PdfRectangle(rect.GetLeft(padding), rect.GetBottom(padding), rect.GetRight(padding), rect.GetTop(padding)));
     }
     if (parent == null)
         writer.AddAnnotation(field);
     else
         parent.AddKid(field);
 }
開發者ID:jagruti23,項目名稱:itextsharp,代碼行數:21,代碼來源:FieldPositioningEvents.cs

示例4: CellLayout

 /**
 * @see com.lowagie.text.pdf.PdfPCellEvent#cellLayout(com.lowagie.text.pdf.PdfPCell, com.lowagie.text.Rectangle, com.lowagie.text.pdf.PdfContentByte[])
 */
 public void CellLayout(PdfPCell cell, Rectangle position, PdfContentByte[] canvases) {
     float sp_left = spacing_left;
     if (float.IsNaN(sp_left)) sp_left = 0f;
     float sp_right = spacing_right;
     if (float.IsNaN(sp_right)) sp_right = 0f;
     float sp_top = spacing_top;
     if (float.IsNaN(sp_top)) sp_top = 0f;
     float sp_bottom = spacing_bottom;
     if (float.IsNaN(sp_bottom)) sp_bottom = 0f;
     Rectangle rect = new Rectangle(position.GetLeft(sp_left), position.GetBottom(sp_bottom), position.GetRight(sp_right), position.GetTop(sp_top));
     rect.CloneNonPositionParameters(this);
     canvases[PdfPTable.BACKGROUNDCANVAS].Rectangle(rect);
     rect.BackgroundColor = null;
     canvases[PdfPTable.LINECANVAS].Rectangle(rect);
 }
開發者ID:nicecai,項目名稱:iTextSharp-4.1.6,代碼行數:18,代碼來源:SimpleCell.cs

示例5: CellLayout

 /**
 * @see com.lowagie.text.pdf.PdfPCellEvent#cellLayout(com.lowagie.text.pdf.PdfPCell, com.lowagie.text.Rectangle, com.lowagie.text.pdf.PdfContentByte[])
 */
 public void CellLayout(PdfPCell cell, Rectangle rect, PdfContentByte[] canvases)
 {
     if (cellField == null || (fieldWriter == null && parent == null)) throw new ArgumentException("You have used the wrong constructor for this FieldPositioningEvents class.");
     cellField.Put(PdfName.RECT, new PdfRectangle(rect.GetLeft(padding), rect.GetBottom(padding), rect.GetRight(padding), rect.GetTop(padding)));
     if (parent == null)
         fieldWriter.AddAnnotation(cellField);
     else
         parent.AddKid(cellField);
 }
開發者ID:bmictech,項目名稱:iTextSharp,代碼行數:12,代碼來源:FieldPositioningEvents.cs

示例6: GetSignatureLocation

 private static Rectangle GetSignatureLocation(Rectangle cropBox, PdfSignatureParameters parameters)
 {
     return new Rectangle(cropBox.GetLeft(parameters.SignatureLeftMargin), 
         cropBox.GetTop(parameters.SignatureYLocation + parameters.SignatureHeight), 
         cropBox.Width - parameters.SignatureRightMargin, 
         cropBox.GetTop(parameters.SignatureYLocation));
 }
開發者ID:affecto,項目名稱:dotnet-Pdf.Toolkit,代碼行數:7,代碼來源:PdfSigner.cs


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