Jump to content

Problems with long regular lines

Recommended Posts

First of all I want to say that I really like Paint.Net.

However, I'm encountering a problem when I want to draw some regular 1 pixel lines without anti-aliasing. When making pixel art one often has to deal with such lines (especially when drawing isometric pictures) and therefore drawing becomes uncomfortable. The problem doesn't exist in MS Paint or Graphics Gale.

It's hard to explain what exactly the problem is, so I attached an image which can be used to reproduce the problem. Use the line tool, set it to 1 pixel, disable anti-aliasing and try to perfectly draw over the red lines using the line tool only once for each line. It doesn't work. It only works if the drawn line is very short. The problem is the same for most regular lines (the green lines are showing some exceptions).

It would be really cool if this problem could be fixed because then Paint .Net would become the best tool for pixel art I have.

I'm currently using Paint.Net v3.20.

Here is the picture (I uploaded it because file attachments don't work at the moment):


EDIT: I also attached the picture to this post because file attachment now works again and just for the case the image I previously posted will be deleted.


Link to comment
Share on other sites

Thanks for the info but unfortunately it doesn't help me. The reasons are mainly the same as andy_blah posted in the second thread you mentioned:

Thank-you MadJik for your suggestions, but hardly any helped me. Firstly, I`m not really interested in using plugins, and really not ANY that forces anti-aliasing, and david.atwell is right. Secondly I have tried the method by holding shift, but that cannot draw isometric straight lines.
However, I would be interested in a plugin which would fix the problem but unfortunately I read plugins can't affect tools. The oblique plugin doesn't solve the problem because it forces anti-aliasing and is not really practical for painting isometric lines.

Is there any chance that the problem can be fixed in the main program or is it very unlikely?

Link to comment
Share on other sites

I tried the arrow plugin. However it doesn't help because: I couldn't manage to produce lines which are exactly the same ones as the red lines which are in my first post. And those red lines are what one needs very often for (isometric) pixel art. Even if the plugin could produce the wanted lines, frequently creating lines using this plugin would be extremely stressful.

Thanks nevertheless, barkbark00.

Link to comment
Share on other sites

Isn't pixel art supposed to be done pixel by pixel, not by using the line tool?

It depends on how one defines pixel art. Some people use line tools, transparency, layers etc. for pixel art and some people are of the opinion that it isn't true pixel art if one uses these "comfortable" tools.

However, this doesn't have much to do with the topic. I don't want to start a discussion about what pixel art is. The bug isn't only pixel art specific. Although pixel art probably is the kind of drawing where the problem with the line tool is most frequently perceived.

Link to comment
Share on other sites

I think I found the source of the problem: The GDI+ method AddCurve(..). If it is used for creating long straight lines the line is messed up. The line looks like it should when created by AddLine(..). Since lines in Paint.Net are AFAIK created as splines ( => AddCurve) by default the problem appears.

Maybe the following could solve the problem: New lines should be drawn using AddLine by default and only be transformed to splines (or to beziér curves) if one uses the hand to modify the line.

What do you think about this?

Btw, here is the C# code I used for testing this:

using System;
using System.Drawing;
using System.Drawing.Drawing2D;

namespace LineTest
   class LineTest
       public static void Main(string[] args)
           Bitmap bmp = new Bitmap(610, 320);

       private static void DrawStuff(Graphics g)
           GraphicsPath badPath = new GraphicsPath();
           badPath.AddCurve(new Point[2] { new Point(0, 0), new Point(600, 300) });

           GraphicsPath goodPath = new GraphicsPath();
           goodPath.AddLine(0, 10, 600, 310);

           g.DrawPath(new Pen(Color.Red, 1), badPath);
           g.DrawPath(new Pen(Color.Green, 1), goodPath);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...