Re: Erasing a line



Kenneth P. Turvey wrote:
I'm using antialiasing and transparency in an app I'm writing and I'm running into some difficulty with the intersection of the two.

Let me work up an example and post it here..

Ok. Well this is no good.

I just wrote a SSCE and it doesn't display the issue I'm having. I also can't seem to locate where in my code it is happening.

Maybe if I describe it someone might be able to give me an idea of where to look. I know this is a long shot. Feel free to guess.

I have an image and on top of it I draw a line with AlphaComposite.CLEAR to clear it. I do this a number of times so I have a clear area on the image.

Why do you do this? By clear area do you mean white?

Then I draw another line in black that is partially overlapping my cleared area with anti-aliasing on.

What I see is that the portion of the line that isn't overlapping the cleared area is anti-aliased just fine, but the portion that is overlapping the cleared area is not.

What is it supposed to anti-alias with if it is clear?

Any guesses as to what I should be looking for in my code. Note, the image is getting passed around and copied during the operation. It isn't all quite as simple as I'm stating or it would be easy to find. The important point is that the image in black is drawn in one call to graphics.drawLine(). I should also note that anti-aliasing isn't working for the clear line drawn either. It is only working for the portion of the black line that isn't drawn on top of a transparent portion of the image.

Thanks for any help you can provide with this poor problem description.

You're probably going to have to make an SSCCE or give a little more information.

--

Knute Johnson
email s/nospam/linux/

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
.



Relevant Pages

  • Erasing a line
    ... I'm using antialiasing and transparency in an app I'm writing and I'm ... What I see is that the portion of the line that isn't overlapping the ... cleared area is anti-aliased just fine, ... for the clear line drawn either. ...
    (comp.lang.java.gui)
  • Re: Problems with Polyline
    ... If a polygon is drawn above this line, ... but the portion below the line is invisible. ... With sufficient thrust, pigs fly just fine. ...
    (microsoft.public.vc.language)