Using Parent/child

  • I have been trying to learn how to use the parent child tags.

    I thought the this only affected the align functions but I can see that also other things like alpha and effect tags are changed when applying a parent tag.

    As far as I can see the only thing that is not applied by default is scale and for that you can use the scalechildren="true" to change.

    But what if you want to have an alpha setting only on the parent plugin ?
    I have not found a way to exclude that for the children the same way as with scale. Setting alpha="1" on the children does not override the setting on the parent.


    Hans

  • Hi,

    when using "parent" the child element becomes a part/child of the parent element,

    a child itself doesn't directly get any values or settings from it's parent, but it will be drawn with or within the parent,
    e.g. when a parent has a alpha value then the whole parent element including all children elements has this alpha value,

    mathematically this could be described that way:
    displayresult = ((children * childrentransformation) + parent)*parenttransformation

    when trying to have a different alpha for different elements, a possibility would be to have several children,
    e.g.
    parent (with small transparent png image - note: alpha=1.0 here)
    - children1 - background image with alpha 0.5 (zorder=1)
    - children2 - foreground image (zorder=2)
    - children3 - ...

    to avoid the need for transparent dummy images for a such parent layers, the next krpano version 1.0.9 will provide possibilities to create such container layers also without transparent images,

    best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!