Suche // Search:

11.07.2012

Die hand-Eigenschaft
//
the hand property

Beim Durchstöbern der XFA Spezifikation bin ich kürzlich auf eine Eigenschaft gestoßen, mit der man die Ausrichtung von Objektkanten steuern kann.
Die "hand"-Eigenschaft bestimmt dabei, ob die Kanten und Ecken eines Objekts mittig auf bzw. links oder rechts von der Objektgrenze gerendert werden.
Das ist praktisch wenn man sehr dicke Kanten eingestellt hat, die aber nicht in das Feld hineinragen sollen und somit Texte überdecken oder eben nicht nach außen überstehen sollen und somit ggf. andere Objekte überdecken.

Die Funktion gibt es auch in anderen Programmen wie z.B. Illustrator, wo sie z.B. "Konturen ausrichten" heißt.
Im Gegensatz zum Designer kann man diese Einstellung dort bequem über einen Dialog einstellen.
Im Designer werden alle Kanten standardmäßig eben, also mittig auf der Objektkante gerendert.
Um das zu ändern bleibt leider nur der Eingriff in die XML-Quelle.
Aber alles halb so schlimm, denn es ist sehr einfach.

While browsing through the XFA specification I recently found a property to control the alignment of object borders.
The "hand" property controls if the borders and edges of an object are rendered even on the object boundary respectively left or right from it.
This is very useful when you use thick borders, that should not project into the field and then potentially overlay texts in the field.
Or, if you want that the borders are only rendered within the object boundaries so they don't cover any other objects in the form.

The same function is available in other apllications such as Illustrator, where it is named "Align Stroke".
In opposition to Designer you there can control this settings easily from a dialog.
Designer always renders all borders even, means in the middle of the object boandary.
To change it your only way is to modify the XML source.
But, worse things happen at sea and this task is just easy.



Auswirkung der "hand"-Eigenschaft auf Objektkanten
//
Effect of the "hand" property on object borders




Händigkeit einstellen
//
Set handedness

Schritt 1 – Rand eines Objekts in der Rand-Pallette auf die gewünschte Stärke einstellen. Standardmäßig wird der Rand immer mittig auf der Objekgrenze angelegt.
//
Step 1 – Set thickness of an objects border in the Border palette. By default the borders are always placed even on the object boundary.



Schritt 2 – Zur XML-Quelle wechseln und das <border>-Tag des Objekts suchen.
//
Step 2 – Switch to XML source and look for the <border> tag of the object.
<field name="Textfeld" y="10mm" x="100mm" w="50mm" h="30mm">
            ...
            <border>
               <edge thickness="1mm"/>
               <corner thickness="1mm"/>
            </border>
         </field>


Schritt 3 – Ergänzen Sie das <border>-Tag um die hand-Eigenschaft mit dem gewünschten Wert.
//
Step 3 – Type the hand property with your desired value into the <border> tag.

<field name="Textfeld" y="10mm" x="100mm" w="50mm" h="30mm">
            ...
            <border hand="left">
               <edge thickness="1mm"/>
               <corner thickness="1mm"/>
            </border>
         </field>


Schritt 4 – Fertig! Die Objektkanten werden nun entsprechend der "hand"-Eigenschaft gerendert..

//
Step 4 – Done! The objekt borders are now rendered accordingly the "hand" property.



Keine Kommentare:

Kommentar veröffentlichen