Re: svg:transform rotate



Greetings, Hans Breuer!

But with master you can load the respective SVG and export it as shape to
get the desired effect (see attachement).

I've got around it by using svg:path. However, the "z" command is not executed
correctly, leaving a visual gap in place of the joint.

Gap confirmed with dia-0-97 branch and GDK renderer. One benefit of the big 
renderer interface change on master is preserving the close information. 
Formerly only Renderer::fill_bezier() was known to be closed, while 
Renderer::draw_bezier() was used for closed or open stroking. Now there is 
Renderer::draw_beziergon() to stroke and/or fill.

[...]
However, there's another problem with this shape.
1. I can't seem to make it 3x3, even if I add a background r=1.5 circle, the
resulting shape is a little thinner. Is this, perhaps, because ellipse is a
little taller than 3 units?
Good guess, but it works for me with current master and the r=1.5 circle.

I'm going to make the ellipse a little smaller. Perhaps, my math to get
endpoints was a little too lax in rounding.

2. How can I override the line colors and styles for certain elements of the
shape?
Again this works for me with master. Setting shape colors is certainly 
possible with dia-0-97 as well, but I can confirm the lack of color with 
the released version and your shape. It is because of a deficiency 
extracting the color name from the style string. Two workarounds:
  1) use numeric color representation
  2) use stand-alone fill/stroke attributes

3. When double-clicking the shape, I'm unable to set default line thickness.
And it always revert to 10mm on each new Dia start. With whole shape being
~30mm... kind of not the visual I'm aiming for. Is this something that can be
worked around?

With master the kludge would be to get rid of the stroke-width by using a 
path with hole. For dia-0-97 I dont know a solution as explained in 
https://mail.gnome.org/archives/dia-list/2008-July/msg00084.html

I see at least one way of doing this, that is transparent and portable.
If the style information is set using style=... or dia:style=... attribute,
present it as Dia internal (customizable) attributes (to the best possible
effect). In this case, values specified by shape are default values, if they
make sense.
If the style is present as svg:style=... - interpret it literal.
When exporting to the SVG, just append real values of internal attributes to
the list of literal attributes.

This way, I could go with something like

<shape xmlns="http://www.daa.com.au/~james/dia-shape-ns";
    xmlns:dia="http://www.daa.com.au/~james/dia-shape-ns";
    xmlns:svg="http://www.w3.org/2000/svg";>
  <name>Custom - Styles mix</name>
  <svg:svg width="300px" height="300px" viewBox="0 0 3 3">
    <svg:circle dia:style="stroke: foreground;"
      svg:style="fill: yellow; fill-opacity: 255; stroke-width: 0.1;
        stroke-dasharray: 1 0.75; stroke-dashoffset: .5;"
      cx="1.5" cy="1.5" r="0.5"/>
  </svg:svg>
</shape>

And only control stroke color from Dia, while the rest is hardcoded in shape.


--
WBR,
Andrey Repin (anrdaemon freemail ru) 17.03.2015, <01:59>

Sorry for my terrible english...



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