Pular para o conteúdo principal

Defining a container

In the visual representation of a PAdES signature, rectangles and containers are defined with the @Lacuna.Pki.Pades.PadesVisualRectangle class.

Container​

A container has the parameters Top, Bottom, Left, Right, Width and Height, as in the figure below.

PAdES rectangle

The container, in red, has its margins relative to the element it is placed in.

To create a container, though, you don't fill in all of its parameters. Each set of parameters has a different effect. The examples below show the ways to define the horizontal dimensions of a container (the vertical dimensions work the same way, as explained after the examples).

Fluid​

If you set only Left and Right, the container keeps the given margins and its width (Width) stretches to fill the remaining horizontal space, as in the figure below.

PAdES fluid rectangle

Left-anchored​

If you set only Left and Width, the container keeps the given left margin and width. The right margin takes up the remaining horizontal space, as in the figure below.

PAdES left anchored rectangle

Right-anchored​

If you set only Right and Width, the container keeps the given right margin and width. The left margin takes up the remaining horizontal space, as in the figure below.

PAdES right anchored rectangle

Centered​

If you set only Width, the container is centered horizontally with the given width, as in the figure below.

PAdES centered rectangle

Vertical dimensions​

The vertical dimensions work the same way as the horizontal dimensions above: replace Left and Right with Top and Bottom, and Width with Height.

See also​

  • @Lacuna.Pki.Pades.PadesVisualRectangle
View as Markdown