Gimp-Forum.net

Full Version: GEGL graph to fill a layer with a rotated pattern
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Considere this 400x300 image:

[attachment=2995]

The common way to do this in gimp is :
- create a 800x600 layer (double size compared to image canvas)
- fill it with Filters > Render > Pattern > Checkerboard
- use the unified transform tool to rotate and translate the layer
- crop the layer to the image size

Now with GEGL graph:
- create a 400x300 layer
- run Filters > Generic > GEGL graph and copy paste the text below in the pipeline field

Code:
checkerboard
 x=25
 y=25
 color1=maroon
 color2=silver

rotate
 degrees=45
 origin-x=200
 origin-y=150


Et voilà!

Note that the indentation is only for better visualisation, it is not needed, all can be writen in one line
Code:
checkerboard x=25 y=25 color1=maroon color2=silver rotate degrees=45 origin-x=200 origin-y=150

Another example:
[attachment=2996]
Code:
color value=yellow

over
 aux=[

   grid
     x=64
     line-width=32
     line-height=0
     line-color=black

  rotate
     degrees=45
 ]
You have been bestowed the highly regarded title of "Resident GEGL expert". Congratulations!
(07-04-2019, 04:46 PM)Ofnuts Wrote: [ -> ]You have been bestowed the highly regarded title of "Resident GEGL expert". Congratulations!

Thanks , Ofnuts.
As a GEGL code contributor, I try to use a lot filters and graph to find new bugs and new usages.