Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning

Parts of the information below may be outdated.

 

See also KGraph and KLayoutData.

...

Direct placement is the default placement data. With KDirectPlacmentData you can define the bounding box for the rendering. 

This must be done by specifying the coordinates of the top left and bottom right corner of the bounding box relative to the bounds of the parent rendering.

For both the horizontal and the vertical part of the coordinate, three values must be set:

  1. The side of the parents bounding box that serves as origin for the following values.
  2. A displacement (in px) to the side specified before.
  3. A relative displacement between 0.0 (no displacement) and 1.0(displacement = width respectively height of the parents bounding box).

The effects of the values chosen in 1. and 2. will be combined by addition.

The following example shows how this placement can be used to specify the position of child renderings.


 

KGridPlacement

Grid placement is another possibility KLighD offers to arrange child renderings. As the name suggest, you can use it to place child rendering on a grid. You can later refine this placement by using KGridPlacementData.

...

You can specify rendering details of KRenderings by adding styles to them.  Simply type in ,styles:‘ followed by a list of the desired styles. Use the content assist for a hint on which styles are available.

Here is an example: