Jump to content

Layering and Drawing


Recommended Posts

  • 1 year later...

I would really like to know this as well. I've been developing a multi-page tiff editor which currently has a working pencil, text tool, color picker, form/image coordinate spaces, etc. It is usable in it's current state, but not perfect. All edits are done by creating a graphics object out of the loaded image and drawing to that.

The text tool works by calling drawstring() on the graphics object every time the user types a character, but when the user backspaces and types again it just overlaps with more text. I figured I would need to implement a layer system like Photoshop has, and it sounds easy enough. It seems like you could just create a new transparent bitmap for each layer with the same size as the original image, and then render them all together in order to a picturebox. I have tried this and it's very slow.

My pencil tool does not create a consistent stroke, it stutters with gaps inbetween. It just draws a square using fillrectangle() whenever the mouse moves, but there's obviously a sync issue with the mouse and the picturebox painting, or something else that causes the stroke to have gaps.

I came here thinking I might find some examples of the inner workings of Paint.NET to give me a clue about some better techniques I could use in my own program. I would greatly appreciate it if a Paint.NET dev could come here and talk about it.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...