SharpLeaf Reference > SharpLeaf Methods > DrawElement Method

SharpLeaf.DrawElement Method

Draw an arbitrary PageElement on current page.

public void DrawElement(
    PageElement element
);
element
Element to draw.

Example

   font = new FontType("Arial",72,FontStyle.Bold,Color.LightGray);
  // Create a text block from bottom-left to top-right (no wrapping)
   text = new TextBlock("Confidential",font,72,-72,-72,72,Alignment.Center,
            VerticalAlignment.Middle,false);
   lf.DrawElement(text);  // Water-mark page with "Confidential"

Description

Draws any arbitrary TextBlock, ImageBlock, Box, Rule or Frame on current page. Frames will only be drawn. To flow into it you need to call NextFrame(Frame) instead.

See also ...

PageElement Abstract Class | PageLayout Glossary | SharpLeaf Members


Send comments on this topic
© Dyalog Ltd 2016