Similar Threads:
1.Paintings using Acrylic Spray paint
2.Brush Painting using DirectX Graphics
Hello,
I created an 2D engine using DirectX Graphics for a 2D painting software. I
want to make a Photoshop gradiant brush style but for now, my works are not
conclusive.
I created a 32x32 A8R8G8B8 texture by filling the RGB with a solid color,
and the A8 is filled with a gradiant round alpha map. Then, I blit the
texture with theses parameters:
SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
SetRenderState(D3DRS_DESTBLEND, D3DBLEND_ONE);
SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
It's seems that the brush texture colors are Added into the render target.
So, If I have a gradiant brush with color RGB(128,128,0), and I draw
several times the same texture over and over... the color will turn to >
then RGB(128,128,0).
Well, I dont know if my explanations are clair, but to made short, I'm
want to make a gradiant photoshop like brush with DirectGraphics. Any tips
are welcome :)
Thanks,
Michel.
P.S.: Sorry for my bad english :(
3.Using JComponent.getGraphics() in Swing for incremental painting
Hello,
I have read many posts and articles saying "don't ever use
getGraphics() in Swing JComponents... always use paintComponent()!" I
understand the motivation for such statements: the paintComponent()
method should be used to implement painting, in order to ensure
correct behavior in all situations.
However, my question is: is it OK, from within an event handler, to
paint using getGraphics() PURELY AS AN OPTIMIZATION, AS LONG AS
paintComponent() does the right thing?
An example:
class MyComponent extends JComponent
{
ArrayList thingsToPaint=new ArrayList();
public void mySwingEventHandler(SomeEvent e)
{
//update thingsToPaint so that paintComponent
//works correctly
thingsToPaint.add(somethingNewToPaint);
//try painting directly
Graphics g = getGraphics();
if(g != null)
{
//we have a graphics, so paint the new
//thing directly.
somethingNewToPaint.drawOn(g);
g.dispose();
}
else
{
//No graphics object available... so just
//call repaint().
repaint();
}
}
public void paintComponent(Graphics g)
{
//paint everything
int i, size = thingsToPaint.size();
for(i=0; i < size; ++i)
{
((ThingToPaint) thingsToPaint.get(i)).drawOn(g);
}
}
};
I actually have a good reason for doing this. I am writing a simple
image manipulation program, and I need to implement a rectanglar
selection facility. In order to accomplish this, I need to listen to
mouseDragged events and repaint the rectangle on the image at each new
position. Swing forces you to re-paint the entire image each time
(i.e. no incremental updates), which is annoyingly slow for this
particular problem. And I don't want to turn off double buffering.
If I use getGraphics() directly (as in the example above), I can just
update a tiny section of the image, and it is blindingly fast and
smooth. I have tested this, and it works wonderfully in my limited
tests. But I don't want to do it if it will be problematic down the
line.
So, is it OK to use getGraphics() if the full repainting functionality
is available in paintComponent()? Or is there some other reason not to
use getGraphics()?
Thanks,
Mike Carrato
4.Background painting using double buffering in Delphi 7
Some of the background areas of my form are not repainting under Delphi 7.
I am using double buffering, as some parts of the form flicker horribly
without it. When I compile in Delphi 6 it works as expected, no flickering,
and repaint works fine, it is only in Delphi 7 that it does this. I would
like to know if anyone has had this problem before, and what you did about
it.
Thanks!
5.Better Painting in Paint Shop Pro 9 - From PC Magazine
It was awarded 4-1/2 stars out or 5!! $119 direct from JASC.
"While Photoshop CS remains the champ for prepress work, Paint Shop Pro 9
continues to provide a more than satisfactory - and much cheaper -
alternative for editing digital photos. And the new painting tools could
attract an entirely new, cameraless audience to the program."
--
Ken
"Buddhism elucidates why we are sentient."
6. That Spray paint someone mentioned
7. looking for painting software in full screen ??looking for painting full screen software ??
8. Lax painting.