iTextSharp.text.pdf.PdfContentByte.BeginText C# (CSharp) Метод

BeginText() публичный Метод

public BeginText ( bool restoreTM ) : void
restoreTM bool
Результат void
        public void BeginText(bool restoreTM)
        {
            if (inText) {
                if (autoControlTextBlocks) {

                } else {
                    throw new IllegalPdfSyntaxException(MessageLocalization.GetComposedMessage("unbalanced.begin.end.text.operators"));
                }
            } else {
                inText = true;
                content.Append("BT").Append_i(separator);
                if (restoreTM) {
                    float tx = state.xTLM;
                    SetTextMatrix(state.aTLM, state.bTLM, state.cTLM, state.dTLM, state.tx, state.yTLM);
                    state.xTLM = state.tx = tx;
                } else {
                    state.xTLM = 0;
                    state.yTLM = 0;
                }
            }
        }

Same methods

PdfContentByte::BeginText ( ) : void

Usage Example

Пример #1
1
// ---------------------------------------------------------------------------    
    /**
     * Draws a character representing an arrow at the current position.
     * @see com.itextpdf.text.pdf.draw.VerticalPositionMark#draw(
     *      com.itextpdf.text.pdf.PdfContentByte, float, float, float, float, float)
     */
    // i'm so stupid; originally forgot to override parent method and wondered
    // why the arrows weren't being drawn...
    public override void Draw(
      PdfContentByte canvas, float llx, float lly, float urx, float ury, float y
    ) {
      canvas.BeginText();
      canvas.SetFontAndSize(zapfdingbats, 12);
      if (left) {
        canvas.ShowTextAligned(Element.ALIGN_CENTER,
          ((char) 220).ToString(), llx - 10, y, 0
        );
      }
      else {
        canvas.ShowTextAligned(Element.ALIGN_CENTER,
          ((char) 220).ToString(), urx + 10, y + 8, 180
        );
      }
      canvas.EndText();
    }
All Usage Examples Of iTextSharp.text.pdf.PdfContentByte::BeginText
PdfContentByte