mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-10 22:24:13 +02:00
1db025ceae
A static text's x/y in an .elmt file are the baseline-left of the text. A program writing an element (a pinout generator, dxf2elmt) then has to measure the text with QET's font metrics to right-align or centre it. With the opt-in anchor="alignment", x is the left edge, centre or right edge selected by Halignment; y stays the baseline. The box is the text without the document margin, as ElementPictureFactory draws it, so the editor and the folio agree. Rotation pivots on x/y as before. The element editor reads it and writes it back for the texts that had it; it does not add it to other texts. Files without anchor draw and save as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
60 lines
5.0 KiB
Plaintext
60 lines
5.0 KiB
Plaintext
<project title="Anchored static texts" uuid="{6c1a2b3d-1251-4c1e-9e57-3f0d0f0a7b10}" version="0.200.1">
|
|
<properties>
|
|
<property name="saveddate" show="1">10/2/26</property>
|
|
<property name="saveddate-eu" show="1">02-10-2026</property>
|
|
<property name="saveddate-us" show="1">2026-10-02</property>
|
|
<property name="savedfilename" show="1">static_text_anchor</property>
|
|
<property name="savedtime" show="1">18:39</property>
|
|
</properties>
|
|
<usage enabled="true" time_spent="0"/>
|
|
<newdiagrams>
|
|
<border cols="17" colsize="60" displaycols="true" displayrows="true" rows="8" rowsize="80"/>
|
|
<inset author="" auto_page_num="" date="null" displayAt="bottom" filename="" folio="" indexrev="" locmach="" plant="" title="" version=""/>
|
|
<conductors bicolor="false" bus="" cable="" color2="#000000" condsize="1" conductor_color="" conductor_section="" dash-size="1" displaytext="1" formula="" function="" horizontal-alignment="AlignBottom" horizrotatetext="0" num="_" numsize="7" onetextperfolio="0" tension_protocol="" text_color="#000000" type="multi" vertical-alignment="AlignRight" vertirotatetext="270"/>
|
|
<report label="%f-%l%c"/>
|
|
<xrefs>
|
|
<xref delayprefix="" displayhas="cross" master_label="%f-%l%c" offset="0" powerprefix="" showallconfiguredslaves="false" showpowerctc="true" showterminalname="true" slave_label="(%f-%l%c)" slave_offset="0" snapto="label" switchprefix="" type="coil" xrefpos="AlignBottom"/>
|
|
<xref delayprefix="" displayhas="cross" master_label="%f-%l%c" offset="0" powerprefix="" showallconfiguredslaves="false" showpowerctc="true" showterminalname="true" slave_label="(%f-%l%c)" slave_offset="0" snapto="label" switchprefix="" type="commutator" xrefpos="AlignBottom"/>
|
|
<xref delayprefix="" displayhas="cross" master_label="%f-%l%c" offset="0" powerprefix="" showallconfiguredslaves="false" showpowerctc="true" showterminalname="true" slave_label="(%f-%l%c)" slave_offset="0" snapto="label" switchprefix="" type="plc" xrefpos="AlignBottom"/>
|
|
<xref delayprefix="" displayhas="cross" master_label="%f-%l%c" offset="0" powerprefix="" showallconfiguredslaves="false" showpowerctc="true" showterminalname="true" slave_label="(%f-%l%c)" slave_offset="0" snapto="label" switchprefix="" type="protection" xrefpos="AlignBottom"/>
|
|
</xrefs>
|
|
<conductors_autonums auto_break_conductors="false" current_autonum="" freeze_new_conductors="false"/>
|
|
<folio_autonums/>
|
|
<element_autonums current_autonum="" freeze_new_elements="false"/>
|
|
<guides/>
|
|
</newdiagrams>
|
|
<diagram author="" auto_page_num="" cols="17" colsize="60" date="null" displayAt="bottom" displaycols="true" displayrows="true" filename="" folio="" freezeNewConductor="false" freezeNewElement="false" height="660" indexrev="" locmach="" order="1" plant="" rows="8" rowsize="80" title="" uuid="{6c1a2b3d-1251-4c1e-9e57-3f0d0f0a7a01}" version="0.200.1-dev">
|
|
<elements>
|
|
<element freezeLabel="false" is_movable="1" orientation="0" prefix="" type="embed://import/anchor.elmt" uuid="{6c1a2b3d-1251-4c1e-9e57-3f0d0f0a7a02}" x="300" y="300" z="10">
|
|
<terminals/>
|
|
<inputs/>
|
|
<dynamic_texts/>
|
|
<texts_groups/>
|
|
</element>
|
|
</elements>
|
|
</diagram>
|
|
<collection>
|
|
<category name="import">
|
|
<names>
|
|
<name lang="en">Imported elements</name>
|
|
</names>
|
|
<element name="anchor.elmt">
|
|
<definition height="80" hotspot_x="100" hotspot_y="10" link_type="simple" type="element" version="0.100.0" width="200">
|
|
<uuid uuid="{6c1a2b3d-1251-4c1e-9e57-3f0d0f0a7a05}"/>
|
|
<names>
|
|
<name lang="en">Anchored static texts</name>
|
|
</names>
|
|
<description>
|
|
<line antialias="false" end1="none" end2="none" length1="1.5" length2="1.5" style="line-style:normal;line-weight:normal;filling:none;color:black" x1="0" x2="0" y1="0" y2="60"/>
|
|
<text text="GPIO21 PCM_DOUT" x="0" y="10" font="Liberation Sans,9,-1,5,50,0,0,0,0,0,Regular" color="#000000" rotation="0"/>
|
|
<text text="GPIO21 PCM_DOUT" x="0" y="20" Halignment="AlignRight" anchor="alignment" font="Liberation Sans,9,-1,5,50,0,0,0,0,0,Regular" color="#000000" rotation="0"/>
|
|
<text text="GPIO21 PCM_DOUT" x="0" y="30" Halignment="AlignHCenter" anchor="alignment" font="Liberation Sans,9,-1,5,50,0,0,0,0,0,Regular" color="#000000" rotation="0"/>
|
|
<text text="GPIO21 PCM_DOUT" x="0" y="40" Halignment="AlignRight" font="Liberation Sans,9,-1,5,50,0,0,0,0,0,Regular" color="#000000" rotation="0"/>
|
|
<text text="GPIO21 PCM_DOUT" x="0" y="50" anchor="alignment" font="Liberation Sans,9,-1,5,50,0,0,0,0,0,Regular" color="#000000" rotation="0"/>
|
|
</description>
|
|
</definition>
|
|
</element>
|
|
</category>
|
|
</collection>
|
|
</project>
|