New render effect extension

Bug #300877 reported by Jonas Termeau
6
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Alexandre Prokoudine

Bug Description

Hello,

I would like to submit a python extension I made for inkscape.

It allows creating easily horizontal and vertical guides for dividing equally the canvas. Users can choose the divisions from None, 1/2, 1/3 ... to 1/10.

You can find it on my google code page : http://code.google.com/p/inkscape-guides-creator/

Revision history for this message
Alexandre Prokoudine (alexandre-prokoudine) wrote :

We are waiting for someone to implement a real guides management (we have a blueprint for that), and until then this sounds like a nice workaround. Will have a look at it and commit. Thanks!

Changed in inkscape:
assignee: nobody → alexandre-prokoudine
importance: Undecided → Low
milestone: none → 0.47
status: New → In Progress
Revision history for this message
Alexandre Prokoudine (alexandre-prokoudine) wrote :

Committed to revision 20248. Thanks!

Changed in inkscape:
status: In Progress → Fix Released
Revision history for this message
Jonas Termeau (jonas-termeau) wrote :

OK, thanks!

Revision history for this message
pbhj (pbhj) wrote :

Would it be possible to add extra options like golden ratio, rule-of-thirds, etc., as buttons?

I'm thinking like the "composition guides" in Digikams picture editting "Transform > Aspect Ratio Crop" dialog.

Revision history for this message
Alvin Penner (apenner) wrote :

just for curiosity, do you have a URL for the Digikams info?

Revision history for this message
Jonas Termeau (jonas-termeau) wrote :

As you can see on the roadmap of this extension (http://code.google.com/p/inkscape-guides-creator/wiki/Roadmap) I will implement golden ratio in the 2.0 version. I think it will be useful to implement it as presets, in order to allow the user to choose in a single list rather than choosing between multiple buttons.

I don't use KDE nor Digikam so I will be interested to hear more about these options. My mail adress is public, you can drop me a mail if you have some time.

Revision history for this message
Alexandre Prokoudine (alexandre-prokoudine) wrote :
Revision history for this message
Jonas Termeau (jonas-termeau) wrote :

I uploaded a new version (2.0b) of Guides Creator extension.

New features :

- presets list with "golden ratio" and "rule of third"
- english and french GUI (provided as two separate .inx files)
- cleaned up code

It's in BETA because i'm not sure for the golden ratio preset. Basically my algorithm separate a length L into three parts: two are equals to 1/1.618th of the length and the third one is the remaining part (L - 2*(L/1.618)). This algorithm is repeated twice (once for the width and once for the height). I think it's the same as Digikam but since I haven't seen its sourcecode I can't tell, so this is the reason why this version is still a BETA. If everything is OK, I'll put it in stable version.

You can get it from http://code.google.com/p/inkscape-guides-creator/downloads/list. Still for inkscape 0.46 stable or 0.46+dev (tested on 04/11/2008 build)

Revision history for this message
Jonas Termeau (jonas-termeau) wrote :

I think the algorithm is correct, since I noticed that Gimp use the same for cropping with "golden section" option.

I'll put it in 2.0.

Revision history for this message
Jonas Termeau (jonas-termeau) wrote :

The version 2.0 is out.

If you want to try it out you can donwload it from here : http://code.google.com/p/inkscape-guides-creator/downloads/

Tell me do you think about it.

Revision history for this message
Jonas Termeau (jonas-termeau) wrote :

The version 2.1 is out.

* the main new feature is diagonal guides implementation (from the diagonal methods)

You can see the release text in more details here : http://code.google.com/p/inkscape-guides-creator/wiki/Roadmap

If you want to try it out you can donwload it from here : http://code.google.com/p/inkscape-guides-creator/downloads/

Tell me do you think about it.

Jonas

Revision history for this message
Alexandre Prokoudine (alexandre-prokoudine) wrote :

I'm quite puzzled about the new version.

1) You can't have both diagonal and regular guides
2) It doesn't look possible to preview diagonal guides without toggling "Remove existing guides" on and off if you previewed regular guides, and vice versa
3) Choose "Custom...", play around with settings, then choose one of the presets and you will see that values in comboboxes do not change as you choose presets

Revision history for this message
Jonas Termeau (jonas-termeau) wrote :

Thanks for your fast reply, I really appreciate that. Here's some anwers to the new behaviours of GC:

1) Yes you can't have them *at the same time*, you have to choose first your regular (or diagonal) guides settings, apply and then choosing your diagonal (or regular) guides settings and apply again, without forgetting to uncheck the "delete existing guides" option to avoid deleting guides you've just created. I did this because I found awkward that someone who just want diagonal guides have to set all the regular guides options to "none" and uncheck all the boxes to avoid regular guides to be drawn (and vice versa). It's a bit frustrating to do that each time you switch between diagonal and regular guides.
There is an alternative solution which consists to put all the options (regular guides and diagonal guides) in the same tab (so in this case not putting tabs at all because there's only two) but the final GUI rendering isn't so nice (a lot of options in the same place, bigger GUI). I think smaller GUIs are better (IMO) and less frightening for new users.
However I'm aware that it isn't the perfect solution to click twice on "apply" button when you want to have both of guides, but it seems to me a "less worst" solution that unset all options each time you want to switch between regular and diagonal guides (IMO, we can discuss it further, maybe i'm the only one here to think like that! :)

2) Yes you're right. I'm thinking to a way to avoid this. The fact is I currently don't know how to check whether the extension is in "preview mode" or in "apply mode" (i don't know if you understand me). I'll need this to change extension's behaviour depending on the "mode" the extension is.
Your wish is to be able to preview diagonal (or regular) guides without deleting the regular (or diagonal) ones you've just created when you're previewing isn't it?

3) You mean the "Vertical guides each" and "Horizontal guides each" labelled comboboxes? Because they are only here for "Custom" preset, all the others presets have their own internal values ("golden ratio" has something like 1.618 ratio and "rule of third" preset is equal to "Custom" preset with 1/3 and 1/3 values (vertical and horizontal)) and so they don't care about these comboboxes.

Thanks again for pointing this out, I look forward reading you, meanwhile I will see how I could manage the #2 (if you or someone have a begining of solution I'll be happy to know it).

By the way I'll be also interested to hear more about other people feelings regarding the #1 (if my proposition is the "less worst" one or not).

Revision history for this message
Jonas Termeau (jonas-termeau) wrote :

For the #1 I have to say that is the same behaviour as inkscape. Take for example "Object > Transform", it as few tabs that are independant (you have to apply twice to get the effect you want (if it needs two tabs (ie. rotation and matrix)). So I think "Guides Creator" GUI is more consistent with inkscape this way.

For the #2 i'm still looking for a solution.

Revision history for this message
Jonas Termeau (jonas-termeau) wrote :

New version is out: 2.2

I added a feature to create margins (header, footer, left/right margins), usefull for making a page layout. You can choose either custom margins or presets (for the moment there's only two). There's also an option to subdivide the area created between the margins into equal proportions.

Screenshots: http://code.google.com/p/inkscape-guides-creator/wiki/Screenshots
Downloads: http://code.google.com/p/inkscape-guides-creator/downloads/list

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.