Re: [custom-shapes] ext_attribute feature, cannot understand.



Am 29.07.2008 18:41, Thomas Harding schrieb:
Hello,
I tried several solutions, but nothing seems work,
except I can fill property in the properties dialogs,
and changes are saved.

Here is the last sample:

[...]
<aspectratio type="fixed"/>
<ext_attributes>
  <ext_attribute name="ext_border_color" type="int" />
  <ext_attribute name="ext-border-width" type="int" />
  <ext_attribute name="csstyle" type="string">
    fill:none;
    stroke:fg;
    stroke-width:8;
    stroke-linecap:round;
    stroke-linejoin:round
  </ext_attribute>
</ext_attributes>
<svg:svg
 [...]

  <svg:path
     d="M 299.97011,1372.2053 C 396.78331,1440.7114
       457.34331,1488.2979 568.47451,1519.4418"
     style="custom:csstyle"
     id="path7572" />
</svg:svg>
<connections>
[...]

What do I miss?

A cool idea but it currently can not work because there is no connection between svg interpretation and extended attribute handling.

And even if there would be such a connection it still wont work due to different interpretation times. The svg of custom shapes is only parsed once at program start. If there are references to the property system they are "compiled" at the same time, e.g. every use of style="stroke: foreground" is replaced by a reference to the property value "line_color" and accordingly Custom::border_color.

Changing the (extended) property value is possible during the whole runtime but only known properties are handled.


-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it.                -- Dilbert



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]