Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GEGL graph to fill a layer with a rotated pattern
#1
Considere this 400x300 image:

   

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:
   
Code:
color value=yellow

over
 aux=[

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

  rotate
     degrees=45
 ]
Reply
#2
You have been bestowed the highly regarded title of "Resident GEGL expert". Congratulations!
Reply
#3
(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.
Reply


Forum Jump: