After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 108838 - Feature Request: Guides (lines coming out of rulers, like gimp and inkscape)
Feature Request: Guides (lines coming out of rulers, like gimp and inkscape)
Status: RESOLVED OBSOLETE
Product: dia
Classification: Other
Component: general
0.94
Other All
: Normal enhancement
: ---
Assigned To: Dia maintainers
Dia maintainers
: 111640 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-03-20 14:48 UTC by Richard W.M. Jones
Modified: 2019-03-20 11:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot showing rulers (14.87 KB, image/png)
2003-03-31 09:54 UTC, Richard W.M. Jones
  Details
Video demo of work-in-progress patch. (2.01 MB, video/ogg)
2018-02-27 01:48 UTC, Martin van Zijl
  Details
Patch to add guides as per GIMP. (76.28 KB, patch)
2018-03-05 18:42 UTC, Martin van Zijl
none Details | Review
Manual for guides. (184.46 KB, application/pdf)
2018-03-05 19:39 UTC, Martin van Zijl
  Details

Description Richard W.M. Jones 2003-03-20 14:48:29 UTC
Richard Jones wrote:

I know I'm being lazy and I _should_ just implement this ... but anyway: 
a simple feature suggestion for dia. I think I first saw this in Visio,  
but it's been many many years since using Windows so I might be mistaken.

Anyway, in Visio there are two moveable lines - one vertical and one
horizontal. They don't do anything, you just move them around. But
they're really useful for two things: (1) Lining things up so they
line up vertically or horizontally, and (2) Marking out the "edge"
of the paper, so you can mentally say to yourself "don't draw anything  
beyond this edge".

Cyrille Chepelov replied:

So in effect, this would be just like a line object, except that its draw
routine would somehow detect that the canvas it's been drawing on is an
interactive canvas (in which case it draws) or it's not (in which case it
does nothing).

Hmmm. Sounds interesting (this dynamic_cast<InteractiveRenderer> doesn't
sound difficult now we've got GObject renderers, thanks to Hans). Besides,
this doesn't even need to have all the formatting properties of lines, just
something to make obvious that it's a formatting aid, not something printed
(maybe even a static label property to remind this to the user).

Lars Clausen replied:

That's an interesting idea.  Maybe tear-off the diagram-side rulers.  Not
high on my list, though.  If you want to do this, go ahead.
Comment 1 Alan Horkan 2003-03-29 04:07:10 UTC
I am fairly sure i know what you mean but a screenshot of what you 
mean would be good.  
are you sure the Gimp does not do anything like this already?  (code 
reuse, or at least learn by example or if you do it yourself maybe add 
it to more than just Dia ...)
Comment 2 Richard W.M. Jones 2003-03-31 09:54:46 UTC
Created attachment 15327 [details]
Screenshot showing rulers
Comment 3 Richard W.M. Jones 2003-03-31 09:57:32 UTC
Added the screenshot showing dia with rulers. By default, of course,
there would be no rulers. You would have to add these, possibly from a
menu item, although IIRC in Visio/the-package-I-was-using the rulers
were hidden at the sides and a special drag would pull then onto the
canvas.

You use the rulers to line things up vertically and horizontally.
Comment 4 Alan Horkan 2004-11-17 19:10:16 UTC
Dia already has rulers aroud the window edges, what you are describing are
called guides.  Guides usually include a function that allows you to snap
objects to them.  
You might be able to add this funtionality by borrowing code from the gimp.  

Changing summary

See my also my request here (which includes visio screenshots)
http://bugzilla.gnome.org/show_bug.cgi?id=111640
(I haven't yet decided which report to close as the duplicate)
Comment 5 Alan Horkan 2004-11-27 00:08:05 UTC
Even though I didn't think much of your attempt to describe this feature you do
did post the request first so I'll close my later bug report as a duplicate of
this one.  Comements from bug 111640 included below.  

http://bugzilla.gnome.org/show_bug.cgi?id=111640

Feature: Guides (like in the Gimp)

To add a guide to a document you click on the ruler and drag, this will
insert a line parallel to the ruler.  This is particularly useful in the
GIMP which does not have a Grid (yet).  Part of the utility of this feature
is "Snap to Guides".  
In the examples I have added quite a few guidelines.  The visio screenshot
also includes Guide points, which look like little targets, and get drawn
if you click in the top right corner just between the rules and drag to the
page.  

I am hoping that because the Gimp has this feature that code can be
borrowed.  (might be an easy-fix, but i wont add the keyword until i know
better).  

Page with the two examples of the Guide feature
http://matrix.netsoc.tcd.ie/~horkana/dev/gnome/gnome-office/dia/screenshots.html

Direct link to the Visio screenshot
http://matrix.netsoc.tcd.ie/~horkana/dev/gnome/gnome-office/dia/screenshots/MicrosoftVisio2000_rulers_guides_guidepoints.png

Direct link to the Gimp screenshot
http://matrix.netsoc.tcd.ie/~horkana/dev/gnome/gnome-office/dia/screenshots/gimp_rulers_and_guides_screenshot.png

Comment 6 Alan Horkan 2004-11-27 00:09:21 UTC
*** Bug 111640 has been marked as a duplicate of this bug. ***
Comment 7 Martin van Zijl 2018-02-27 01:47:56 UTC
I've started implementing guides like in the Gimp (i.e. click on ruler and drag). So far you can add, remove, and move the guides. There is also basic snapping.

I'm planning to fix few things before I submit the final patch, though.

Video demo attached below.
Comment 8 Martin van Zijl 2018-02-27 01:48:44 UTC
Created attachment 368984 [details]
Video demo of work-in-progress patch.
Comment 9 Martin van Zijl 2018-03-05 18:42:31 UTC
Created attachment 369361 [details] [review]
Patch to add guides as per GIMP.
Comment 10 Martin van Zijl 2018-03-05 19:39:21 UTC
Created attachment 369364 [details]
Manual for guides.
Comment 11 Martin van Zijl 2018-03-05 19:43:39 UTC
I've attached the patch. 

I've also attached the documentation in PDF format. I'm hoping to integrate this into the Dia manual (http://dia-installer.de/doc/en/index.html) - if the patch is accepted, of course.

Please test this if you have time, as it is quite a lot of code and I may have missed a bug or two.
Comment 12 GNOME Infrastructure Team 2019-03-20 11:06:08 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/dia/issues/79.