Is there a way to paint every second pixel in photoshop? (For dithering) - pixel

I'm asking this question with regards to drawing pixel art. If I want to draw a line for example, I can just click on one pixel with my pencil tool, hold shift and click where I want the line to end. I was wondering if there was some way to do the same, but only paint every other pixel so I don't have to paint every other pixel individually whenever I want to achieve the dithering effect. This is especially annoying when I'm doing a long line.
Thanks for you help!

Start with a new layer,then Draw a line you want
and click "ctr + J", You can create new copy of the same line.

Related

line isn't visible due to other components on the frame

I'm trying to draw a line on my frame (did it on FormPaint method).
The issue is that frame have some components on it, and among all it have image which covers all frame's area.
Therefore, the line isn't visible.
Any ideas how to solve it?
Thanks in advance!
You are drawing on the Frame itself, but the TImage is covering the Frame's client area, so it covers any drawing that you do on the Frame. You need to re-think your drawing strategy. If you want the line to appear on top of the TImage, then draw the line on the TImage instead of the Frame. Or else put a separate TImage/TPaintBox on top of the TImage and draw on that instead.

Need line drawing algorithm for simulating natural pencil

I'm writing a drawing program that uses a pressure sensitive table for input. I'd like to be able to simulate the soft pencil effect that many other art programs have (such as Paint Tool SAI, Art Rage). Technique I'm using at the moment is functional, but is missing the cleanness I see in more professional programs.
My algorithm at the moment works like this:
Create a bitmap representing the head of the brush. This is just a transparent bitmap with a black circle drawn on it. The circle has an inner radius that is solid black and an outer radius. The blackness linearly fades from opaque to transparent as you move from the inner to the outer radius.
Capture input events from my tablet. Each point contains an (x, y) coordinate as well as a pressure value
For every point after the first one, draw a line from the previous point to the current one. This is done by drawing (daubing) the brush bitmap several times between the two points. The step size between each daub is chosen so there is an overlap between subsequent daubs.
This works reasonably well, but the result is a line that is somewhat blobby and jagged.
One thing I need to do is somehow smooth out the input points so that the stroke as a whole is smooth.
The other thing I need to do is figure out how to 'drag' the brush head along this path to make the stroke. If the spacing is too far apart, the stroke looks like a line of circles. If too close together, the stroke builds up on itself and becomes very dark. (I tried to fix this by attenuating the brush by the spacing. This does make things more consistent, but stops the stroke from being fully opaque).
Anyhow, I'd expect that there's a lot of research already done on this, if only I knew where to look. Please let me know if there are any better pencil drawing algorithms out there.
Instead of drawing the new circle over what has already been drawn, using the standard blending functions (so that regions of overlap get a higher opacity), you need to keep the maximum opacity so far.
Only after you have built up the complete stroke (as on a white sheet), you can blend it to the existing line art.
The picture illustrates the difference between blending and keeping the maximum opacity.

how make my picturebox cover only my image nt the boarder around it

I'm doing a game app in Visual Studio 2010 windows forms, I had inserted an image in the picture box and I need to bounce my image in the form when it bounces the boarder of the picutre box is overlying on another label or it is distracting another label i.e., it is looking weird as if is is a rectangular image(but i saved the image in .png format)
so is there any one who could help me in this.
and also if possible plz notify me any best technique which is used to make the object jump on to another object(Picture).
(i.e., how to give a best movement to the ball when I press a key) :)
I'm not quite sure what you wanted, isn't the image box same size as your picture?
If there is white in your pic that you don't want to show, you should make it transparent with image editor.
Better way of moving that ball would probably be BitBlt function.
Anyway, it's hard to say what is the best way to move the ball since you did not say how you want to move it. Timer which moves ball while key is pressed is probably the simplest way to do that.

Flash animation help

I am a complete novice when coming to using Flash but I am looking to create an animation similar to the line into text animation at:
http://www.louisebradley.co.uk/fl/
where instead of running from the top of the screen I want the line to effectively stretch across my homepage horizontally.
I have created an animated gif that does the job but it takes a long time to stretch across 974 pixels in width, and if the frames are reduced it takes away any smoothing effect. I did this in photoshop by simply creating 20 or so frames, each increasing the size of the line by 60 pixels until the full page is covered.
Would I be better off creating the effect in Flash? And if so, where on earth do I start!! Would tweening do this, and how I would I implement it?
Thanks in advance for any help!
I am assuming you are talking about the line to the left of the main navigation? If this is the case, this is being done using a mask that is tweened. You can simply draw out the shape you want "wiped" across the screen and than on the layer above it, draw a box over the shape to be animated. Right click the layer the box is on and select "mask". You can now tween the mask to move from right to left over the shape you drew and it will appear to wipe over. Just remember, whatever the mask is currently over, is what will show through from the layer that is masked. Think of the mask as a window. This can be completely done without actionscript and only using the timeline.

How to draw a selected text in win32 using only gdi call?

I tried to draw a selected text using two TextOut call and TA_UPDATECP flag but when I move the selected area, the characters are moving a bit.
Does someone know the correct way to do that ?
According to the MSDN documentation, when you have set the TA_UPDATECP flag using SetTextAlign(), TextOut() ignores its position parameters in favor of the device context's current position. Without seeing your code, I suspect that your drawing algorithm calls TextOut() with a current position that differs slightly based on the selection.
As a debugging strategy, you can call GetCurrentPositionEx() just before you call TextOut() to obtain the current position and make sure it matches your expectation for where the text should be drawn.
I believe that antialiasing and ClearType can draw text at fractional pixel positions. If you draw a string of text, and then try to redraw a portion of the middle, there might not be a way for you to draw text starting at exactly the same position as those characters in the middle. The trick seems to be to redraw the entire string, but with a clipping region for the selected text.
Chapter 4 in this tutorial on writing a Win32 text editor goes into quite some detail on how to draw selected text.

Resources