Cyotek Forums

Source Code => Source Code => Topic started by: weiquanho on November 26, 2015, 04:28:54 AM

Title: Ruler
Post by: weiquanho on November 26, 2015, 04:28:54 AM
Thank you so so much for developing such a great tool!
It will be my very great guideline!

I wish add horizontal ruler and vertical ruler which it will adjust according to the zoom ratio and the vertical & horizontal scroll.

I'm still scratching my head... haha



Have a good day and Thank You!
:)
Title: Re: Ruler
Post by: Richard Moss on November 27, 2015, 06:38:17 AM
Hello,

Welcome to the forums, and I'm glad you're enjoying the control. Drawing a ruler on top of the control should be possible, I'll see if I can find time to do a concept demo. However, I'm somewhat busy right now so it may take a little while before I have time to look at this.

Regards;
Richard Moss
Title: Re: Ruler
Post by: weiquanho on November 27, 2015, 08:07:49 AM
Thank you so much for spending the time to reply me!  :)

I've been looking around and found this : http://www.codeproject.com/Articles/4369/Ruler-Control
and I've been stuck with this.. Haven't found a way to put it in yet...


Have a great weekend ahead!
Title: Re: Ruler
Post by: Richard Moss on December 01, 2015, 06:30:36 PM
I took a look at the Ruler control you mentioned, and knocked up a brief concept demo. It's by no means perfect - that ruler control is nice, but does have some bugs with text alignment, and could do with some improvements.

I've attached the concept demo to this post - I don't imagine I'm going to have any time to refine it any time soon but hopefully this will give you a starting point to adapt for your own needs.

(https://forums.cyotek.com/proxy.php?request=http%3A%2F%2Fwww.cyotek.com%2Ffiles%2Fforumimages%2Frulertest-1a.png&hash=b26a07c52ca1357bb97b47441f03a60ef5fcdd1c)

(https://forums.cyotek.com/proxy.php?request=http%3A%2F%2Fwww.cyotek.com%2Ffiles%2Fforumimages%2Frulertest-1b.png&hash=e3512abaacb9bf54399e5071fc752f4ed8c31e43)
Title: Re: Ruler
Post by: weiquanho on December 02, 2015, 09:00:42 AM
Wow!
A million thanks for the guide!
It is really helpful!!  :D


Warm Regards,
Wei Quan
Title: Re: Ruler
Post by: Richard Moss on December 02, 2015, 04:26:50 PM
Although it's only a concept and needs more work, I'm glad it was useful and you're welcome. Good luck with your project :)