SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Draw lines in editor

Last post 09-06-2017 1:45 PM by Sugz. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 05-24-2016 10:04 AM

    • enigma
    • Not Ranked
    • Joined on 01-07-2016
    • Torino, Italy
    • Posts 9

    Draw lines in editor

    Hi to all.

    I want to draw lines for connect start and end of a block (if, for, etc), like VS2015 or Notepad++. I make a service as TextMarkerService used by ErrorPainter. But in that case, it draw a polygon (similar to a vertical line). I have to draw a vertical line. I've calculated start and end positions of lines, but if I scroll text, lines don't scroll. I think is a problem with calculating position considering actual visual lines.

    How can I calculate start and end positions (as Point)?

     

    Thanks a lot.

    Andrea

  • 05-24-2016 2:07 PM In reply to

    • enigma
    • Not Ranked
    • Joined on 01-07-2016
    • Torino, Italy
    • Posts 9

    Re: Draw lines in editor

    Thank you all, I solved. I forgot to consider ScrollOffset. :)

     

     

  • 09-04-2017 4:57 PM In reply to

    • Sugz
    • Not Ranked
    • Joined on 09-02-2017
    • Posts 2

    Re: Draw lines in editor

    Hi everyone

    I'd like to have this feature too, but I have no idea how to implement it, could anyone suggest me something, at least to get me started ?

    Thanks

  • 09-06-2017 1:32 PM In reply to

    • enigma
    • Not Ranked
    • Joined on 01-07-2016
    • Torino, Italy
    • Posts 9

    Re: Draw lines in editor

    Hi Sugz..

    Here is how I have implemented this feature..

    I duplicated TextMarkerService class in a new FolderService class. You can find a copy of this class here https://expirebox.com/download/4908b5a839a8f0b00f40b9f5fb11c8f0.html. This link expire in 48h.

    Then, in CodeEditor class I added an instance of FolderService class as TextMarkerService class. (Only one difference with TextMarkerService class. I didn't add the FolderService class instance in textView.LineTransformers...)

     

    I hope this can helpful.

    Andrea

  • 09-06-2017 1:45 PM In reply to

    • Sugz
    • Not Ranked
    • Joined on 09-02-2017
    • Posts 2

    Re: Draw lines in editor

    Thanks a lot :)

Page 1 of 1 (5 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.