[vwnc] drawing a single pixel on screen?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] drawing a single pixel on screen?

Mark Plas

Hi,

 

Do you know of an efficient way to draw an individual pixel onto a screen graphicscontext?

 

I’ve tried with drawing a line from a point to the same point but that doesn’t display anything:

 

|gc|

gc := ScheduledControllers activeController view graphicsContext.

gc paint: ColorValue red.

gc displayLineFrom: 200@200 to: 200@200.

 

 

However, when I draw a line from a point to (point + 1@0) it draws TWO points!

 

|gc|

gc := ScheduledControllers activeController view graphicsContext.

gc paint: ColorValue red.

gc displayLineFrom: 200@200 to: 201@200.

 

I just want one pixel.

 

There is displayDotOfDiameter:at: but that one relies on #displayWedgeBBoxOrigin:extent:startAngle:sweepAngle: which looks like overkill?

 

Any ideas?

Mark


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] drawing a single pixel on screen?

Joachim Geidel
Am 13.10.08 11:20 schrieb Mark Plas:
> Do you know of an efficient way to draw an individual pixel onto a screen
> graphicscontext?

Did you already try drawing a filled Rectangle with width = height = 1?

Joachim Geidel


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] drawing a single pixel on screen?

Mark Plas

I did using #displayRectangularBorder and that one didn't work either, but when I use #displayRectangle: it works.

Thanks!

-----Original Message-----
From: Joachim Geidel [mailto:[hidden email]]
Sent: maandag 13 oktober 2008 13:04
To: Mark Plas; [hidden email]
Subject: Re: [vwnc] drawing a single pixel on screen?

Am 13.10.08 11:20 schrieb Mark Plas:
> Do you know of an efficient way to draw an individual pixel onto a screen
> graphicscontext?

Did you already try drawing a filled Rectangle with width = height = 1?

Joachim Geidel



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] drawing a single pixel on screen?

Adrian Kuhn
In reply to this post by Mark Plas
Mark Plas <mark.plas <at> mediagenix.tv> writes:

> Hi,
>
> Do you know of an efficient way to draw an individual
> pixel onto a screen graphicscontext?
>
> I’ve tried with drawing a line from a point to
> the same point but that doesn’t display anything:
>
> [..]
>
> I just want one pixel.
>
> There is displayDotOfDiameter:at: but that one
> relies on #displayWedgeBBoxOrigin:extent:startAngle:sweepAngle: which looks
> like overkill?
>
> Any ideas?
>
> Mark
>

I use #drawRectangle to draw a pixel.

An alternative is to setup a bitmap, draw on that and eventually
use #drawImage to draw the whole bitmap.

cheers,
AA










_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc