Re: [Flashcoders] anti-aliasing

2009-05-18 Thread Ian Thomas
A quick thought, Anthony... why reinvent the wheel?

Why not use Flash's built-in graphics.moveTo()/graphics.lineTo() etc.
to draw _vector_ lines into a Sprite (which will therefore be nicely
antialiased by Flash), then capture the results as a bitmap and paste
them into whatever BitmapData you are trying to create?

It will be a lot faster at runtime than plotting a line pixel by
pixel. Unless you have a specific need to do that!

Cheers,
   Ian

On Mon, May 18, 2009 at 4:48 AM, Anthony Pace anthony.p...@utoronto.ca wrote:
 I already know how to draw shapes using the built in tools. and the math for
 it is not a problem in the slightest; yet, it is the anti-aliasing of the
 lines, when trying to draw them with setPixel() or setPixel32, that I am new
 to.

 Ron Wheeler wrote:

 You are on the right list.

 To get some help, you will probably have to give more details.
 - 2D or 3D
 - vectors or rasters - images or drawings
 - what kind of shapes
 - dynamic or static
 - data driven or algorithmic
 - user interaction desired
 - low-res icons or sprites for a game or beautifully rendered images
 suitable for printing

 Google is also your friend.

 Ron


 Anthony Pace wrote:

 Hello,

 I am trying to draw shapes using pixel manipulation, and I am pretty sure
 I understand most of the concepts; yet, as I am pretty new to this, I am
 unsure how to go about doing this most efficiently in code.

 Does anyone have any links, tutorials, commented code? Are there tried
 and true formulae I should be using that you may know of? or should I just
 look at converting a library from another language because there is no point
 reinventing the wheel because the best formulae have been found? should I be
 discussing this on a different list?

 Thanks,
 Anthony
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] anti-aliasing

2009-05-18 Thread Anthony Pace
I have heard of and looked at Xiaolin Wu's line algorithm, and I am 
wondering if there is a better way.


Anthony Pace wrote:

Hello,

I am trying to draw shapes using pixel manipulation, and I am pretty 
sure I understand most of the concepts; yet, as I am pretty new to 
this, I am unsure how to go about doing this most efficiently in code.


Does anyone have any links, tutorials, commented code? Are there tried 
and true formulae I should be using that you may know of? or should I 
just look at converting a library from another language because there 
is no point reinventing the wheel because the best formulae have been 
found? should I be discussing this on a different list?


Thanks,
Anthony
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] anti-aliasing

2009-05-18 Thread Anthony Pace
You are right, in most scenarios you would want to use built in 
functionality; however, outside of regular applications in as3, there 
are a lot of reasons to know this well, and graphics applications that 
would be impossible by relying on what is built in.



Ian Thomas wrote:

A quick thought, Anthony... why reinvent the wheel?

Why not use Flash's built-in graphics.moveTo()/graphics.lineTo() etc.
to draw _vector_ lines into a Sprite (which will therefore be nicely
antialiased by Flash), then capture the results as a bitmap and paste
them into whatever BitmapData you are trying to create?

It will be a lot faster at runtime than plotting a line pixel by
pixel. Unless you have a specific need to do that!

Cheers,
   Ian

On Mon, May 18, 2009 at 4:48 AM, Anthony Pace anthony.p...@utoronto.ca wrote:
  

I already know how to draw shapes using the built in tools. and the math for
it is not a problem in the slightest; yet, it is the anti-aliasing of the
lines, when trying to draw them with setPixel() or setPixel32, that I am new
to.

Ron Wheeler wrote:


You are on the right list.

To get some help, you will probably have to give more details.
- 2D or 3D
- vectors or rasters - images or drawings
- what kind of shapes
- dynamic or static
- data driven or algorithmic
- user interaction desired
- low-res icons or sprites for a game or beautifully rendered images
suitable for printing

Google is also your friend.

Ron


Anthony Pace wrote:
  

Hello,

I am trying to draw shapes using pixel manipulation, and I am pretty sure
I understand most of the concepts; yet, as I am pretty new to this, I am
unsure how to go about doing this most efficiently in code.

Does anyone have any links, tutorials, commented code? Are there tried
and true formulae I should be using that you may know of? or should I just
look at converting a library from another language because there is no point
reinventing the wheel because the best formulae have been found? should I be
discussing this on a different list?

Thanks,
Anthony
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

  

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

  

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] anti-aliasing

2009-05-18 Thread Ian Thomas
Oh absolutely. :-) Just thought this might be a quick route to
achieving whatever you're currently trying to achieve. :-)

Ian

On Mon, May 18, 2009 at 10:53 AM, Anthony Pace anthony.p...@utoronto.ca wrote:
 You are right, in most scenarios you would want to use built in
 functionality; however, outside of regular applications in as3, there are a
 lot of reasons to know this well, and graphics applications that would be
 impossible by relying on what is built in.


 Ian Thomas wrote:

 A quick thought, Anthony... why reinvent the wheel?

 Why not use Flash's built-in graphics.moveTo()/graphics.lineTo() etc.
 to draw _vector_ lines into a Sprite (which will therefore be nicely
 antialiased by Flash), then capture the results as a bitmap and paste
 them into whatever BitmapData you are trying to create?

 It will be a lot faster at runtime than plotting a line pixel by
 pixel. Unless you have a specific need to do that!

 Cheers,
   Ian


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] anti-aliasing

2009-05-18 Thread Ron Wheeler

You are on the right list.

To get some help, you will probably have to give more details.
- 2D or 3D
- vectors or rasters - images or drawings
- what kind of shapes
- dynamic or static
- data driven or algorithmic
- user interaction desired
- low-res icons or sprites for a game or beautifully rendered images 
suitable for printing


Google is also your friend.

Ron


Anthony Pace wrote:

Hello,

I am trying to draw shapes using pixel manipulation, and I am pretty 
sure I understand most of the concepts; yet, as I am pretty new to 
this, I am unsure how to go about doing this most efficiently in code.


Does anyone have any links, tutorials, commented code? Are there tried 
and true formulae I should be using that you may know of? or should I 
just look at converting a library from another language because there 
is no point reinventing the wheel because the best formulae have been 
found? should I be discussing this on a different list?


Thanks,
Anthony
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders