Re: [Gegl-developer] problem drawing a path



On Sat, Feb 2, 2013 at 7:08 PM, Torsten Mohr <tmohr s netic de> wrote:
Hello,

I'm trying to draw a path based on an XML example, i try to draw a line in a
320x320 gray image:

<?xml version='1.0' encoding='UTF-8'?>
<gegl>
  <node operation='gegl:path'>
    <params>
      <param name='fill'>rgb(1.0, 0.0, 0.0)</param>
      <param name='stroke'>rgb(1.0, 1.0, 1.0)</param>
      <param name='stroke-width'>15.0</param>
      <param name='stroke-opacity'>0.5</param>
      <param name='stroke-hardness'>1.0</param>
      <param name='d'>M100 0 L 100 320</param>
    </params>
  </node>
  <node operation='gegl:crop'>
    <params>
      <param name='width'>320.000000</param>
      <param name='height'>320.000000</param>
    </params>
  </node>
  <node operation='gegl:color'>
    <params>
      <param name='value'>rgb(0.5, 0.5, 0.5)</param>
    </params>
  </node>
</gegl>

gegl file.xml -o test.png

I can't reproduce what i get as a result, i can see a gray background, but i
can't see no line.  Also, there are two stripes with just  Alpha shown at the
top and the bottom of the image.

I did not find any example XML that uses gegl:path, also i did not find
information about the format of the path, i assumed SVG format.

Can anybody explain the output i see from my XML?

Is there an example that uses gegl:path?

I did not find any explicitly described way to create an image in memory, are
the last two nodes the preferred way to create a gray image of 320x320?


Thanks for any hints
Torsten

In bin/gegl.c there's a #define called DEFAULT_COMPOSITION that uses
gegl:fill-path. That's an example of how vectors are described.



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