Switch to full style
Post all Gimp scripts and script writing questions here
Post a reply

Re: Simple path shapes

Fri Nov 04, 2016 5:36 am

Hi Graechan.

"Advanced Rounded Rectangle", "Oval" and "Flowers & Spikes" by Jonathan Stipe it is very interesting
- only requires new 7-9 items (options) on the menu and this is probably too much in this version.
Peter (PKHG) started a new post Beginners and PyGtk, Plugins
http://gimpchat.com/viewtopic.php?f=9&t=14858 So can I learn how to do this with GTK...

Re: Simple path shapes

Fri Nov 04, 2016 1:33 pm

MareroQ wrote:Hi Graechan.

"Advanced Rounded Rectangle", "Oval" and "Flowers & Spikes" by Jonathan Stipe it is very interesting
- only requires new 7-9 items (options) on the menu and this is probably too much in this version.
Peter (PKHG) started a new post Beginners and PyGtk, Plugins
http://gimpchat.com/viewtopic.php?f=9&t=14858 So can I learn how to do this with GTK...


Now you understand the motivation behind ofn-path-to-shape. Why enter all this data by hand when you can draw it instead?

Re: Simple path shapes

Wed Nov 09, 2016 3:34 pm

Rel 1.0 End:
- repair deprecated procedure for Grid by Ofnust in Gimp 2.9.5 (called 'gimp-image-add-vectors'.It should call 'gimp-image-insert-vectors' instead!),
- only one version (common for Gimp 2.8/2.9 - thanks Ofnuts http://gimpchat.com/viewtopic.php?f=9&t=14857#p206183),
- option "Resize layer" only run interactive,
- add shapes: Grid:"Rectangle", "Ellipse", "Hexagon", "Diamond", "Octagon" based on Shapegrid 1_1.py by dd http://gimpchat.com/viewtopic.php?f=9&t=1593&start=0&hilit=Shapegrid (adaptation code script-fu JMS - James Sambrook).

PS. Version PyGTK in my performance will not - too many problems in Gimp 2.9.5 for my poor coding skills :gaah .

Re: Simple path shapes

Wed Nov 09, 2016 8:52 pm

Sorry I Meant only 4 controls
Top-left Radius
Top-right Radius
Bottom-left Radius
Bottom-right Radius
where for e.g. the Top-left Radius would set both of the Top-left horizontal and vertical Radius

Re: Simple path shapes

Thu Nov 10, 2016 5:20 pm

Hi Graechan.
For You:
Rel 1.1: add shape: Rounded Rectangle Advanced created by Jonathan Stipe.

More opportunities than I expected (including negative values...)

Re: Simple path shapes

Thu Nov 10, 2016 8:12 pm

Jonathan Stripe's settings are in degrees whereas yours are a percentage of width and height, this resulted in an uneven rounding of the rectangle↓
Image
I made a correction to temporarily fix this↓
Image
This produced a better result (maybe just useing the menu setting is better)
Image

Re: Simple path shapes

Fri Nov 11, 2016 1:30 am

Thank You for the tip - it can still differently (% shorter side)?

Code:
   if s==49: # RUNDED RECTANGLE Advanced
      if sel==False:
         top=0
         left=0
         bottom=H1
         right=W1
         radiusx1=min((M_L)*W1/100 ,(M_L)*H1/100)
         radiusy1=min((M_L)*W1/100 ,(M_L)*H1/100)
         radiusx2=min((H_L)*W1/100, (H_L)*H1/100)
         radiusy2=min((H_L)*W1/100, (H_L)*H1/100)
         radiusx4=min((V_L)*W1/100, (V_L)*H1/100)
         radiusy4=min((V_L)*W1/100, (V_L)*H1/100)
         radiusx3=min((R_L)*W1/100, (R_L)*H1/100)
         radiusy3=min((R_L)*W1/100, (R_L)*H1/100)
      if sel==True:
         top=y1
         left=x1
         bottom=y2
         right=x2
         radiusx1=min((M_L)*W/100, (M_L)*H/100)
         radiusy1=min((M_L)*W/100, (M_L)*H/100)
         radiusx2=min((H_L)*W/100, (H_L)*H/100)
         radiusy2=min((H_L)*W/100, (H_L)*H/100)
         radiusx4=min((V_L)*W/100, (V_L)*H/100)
         radiusy4=min((V_L)*W/100, (V_L)*H/100)
         radiusx3=min((R_L)*W/100, (R_L)*H/100)
         radiusy3=min((R_L)*W/100, (R_L)*H/100)
      pdb.script_fu_advanced_rounded_rectangle_path_ssc (image, layer, 'Rounded Rectangle', top,left,bottom,right,radiusx1,radiusy1,radiusx2,radiusy2,radiusx4,radiusy4,radiusx3,radiusy3,run_mode=RUN_NONINTERACTIVE)

Re: Simple path shapes

Fri Nov 11, 2016 3:50 am

MareroQ, please have a look at
http://gimpchat.com/viewtopic.php?f=25&t=14892&p=206655#p206655
(one drawback, its an old version1 used ...)
Your new one I have to look at ...

Re: Simple path shapes

Fri Nov 11, 2016 6:35 am

I really think that this filter (Simple shapes centered), should be placed under <Vectors>/Shapes/Simple shapes centered

so it will show in GIMPs path layers menu.

Re: Simple path shapes

Thu Nov 17, 2016 4:35 am

MareroQ
I am busy to use GitHub for my Arakne guidelabextra plugin, started today.

I mentioned in the README.md your plugin, which I used ...

Do I get your permission to include a version from around end October version 1 beta I think?

Link is (one file at this moment 17 nov) https://github.com/PKHG/guidelab_paint
telling what and why ;-)

All neded info for helping me is now available

Re: Simple path shapes

Thu Nov 17, 2016 4:42 am

Hi Peter.
I will be very glad if You use what you want... :hi5

Re: Simple path shapes

Sat Nov 19, 2016 4:11 am

Now I am able to choose items out of a list, e.g. soon examples from your plugin MareroQ.

Pygtk becomes clearer and clearer: the example shows a TreeView and several selected lines.
And made available to the plugin (after an OK klick).

Example (after a lot of trials, several days ;-) ).
several_selectd_items.jpg
several_selectd_items.jpg (68.05 KiB) Viewed 1345 times

Re: Simple path shapes

Sat Dec 03, 2016 9:24 am

MareroQ
With an old Simple_shapes .. build with my latest plugin using it ;-)

Shapes (4) selected and told rowise insertion and random pattern to fill gave:

guidelab_cards_example_1.png
example several chosen shapes at once
guidelab_cards_example_1.png (363.82 KiB) Viewed 1295 times


In principle the shapes got a midpoint at the intersections of guides.
I realized just lately, that the shapes become smaller if the selection is a rectangular, because a selection is outside the border ;-) .
Means, it has to be mentioned/described in the next user guide of the plugin ;-)
Greets
Peter

example

Mon Dec 05, 2016 4:30 am

Hi Marero!
Not online here?

Only some clicks and I made this:

Gear02guidelab_paint.png
Gear02guidelab_paint.png (116.3 KiB) Viewed 1249 times


My UI for it looks now (5 dec) as follows:

guidelabShapes_tab.jpg
guidelabShapes_tab.jpg (52.16 KiB) Viewed 1249 times

Re: Simple path shapes

Tue Dec 06, 2016 2:45 am

@MareroQ, good moorning and hallo ;-)

Look in an older version for s == 20 Pie 1/2 which creates 4 1/2 circles.
I think I succeeded to change it in 4 1/4 circles ;-)
You used (very nice) a circle and cutting out squares , so changing the upper left corner of the squares (if needed) and the width was sufficient.
Post a reply