Re: points vs pixels.
From: Dale King (KingD_at_tmicha.net)
Date: 05/25/04
- Next message: wEEdpEckEr: "String.replaceAll() with regex?"
- Previous message: JamesY: "Outputting value of variable during execution"
- In reply to: Roedy Green: "Re: points vs pixels."
- Next in thread: Roedy Green: "Re: points vs pixels."
- Reply: Roedy Green: "Re: points vs pixels."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 25 May 2004 10:12:53 -0500
"Roedy Green" <look-on@mindprod.com.invalid> wrote in message
news:<m0rpa010mo4qfaedt6mdna0iuq1iif36mk@4ax.com>...
> On Thu, 20 May 2004 16:36:37 GMT, Roedy Green
> <look-on@mindprod.com.invalid> wrote or quoted :
>
> >>default device coordinate space is 72 units per inch which does
> >>not necessarily correspond to pixels. The user can then add an
> >>affine transform to create whatever coordinate system they like.
> >
> >I will add that.
>
> This is now done. The material was there before, it is just now I put
> more emphasis on it.
You added very little emphasis on it. You add it as an afterthought as
though it were extraneous information. I'm sorry to be so nit-picky and this
is an advanced topic that requires a paradigm shift in your way of thinking.
But I don't think it is best to teach newbies the flawed concept of thinking
in pixels only to then have to have them unlearn it later. It is best to
start them down the right path from the beginning.
Issues:
"The origin 0,0 is in the top left corner...not the bottom left where
Descartes put it": Technically Descartes put it in the center. The notion of
top and bottom corresponding to a particular direction for y is an arbitrary
convention.
"For Java units are integer pixels": That was true for Java 1.1 but not for
Java2D, where they are neither integer nor pixels.
"For mouse events, drawing geometric shapes, and placing Components with
absolute co-ordinates in the null layout, the origin 0,0 is the upper left
corner.": The issue is the upper left corner of what? The answer depends on
the situation, but is usually the container of the component.
"When you place an object on the screen, you specify the location of its
upper left corner.": Not necessarily true in user coordinate space.
"For GridBagLayouts the origin 0,0 is the upper left corner of the enclosing
container": This is not a function of the layout but of the container.
"drawRectangle and brothers deliberately draw rectangles one pixel taller
and wider than requested": That is true, but in Java2D you use drawShape and
have much greater control. You specify where the border of the shape is and
the stroke that is drawn on top of that line such that typically you are
specifying the center of the drawn outline.
"Because co-ordinates are measured in hardware-dependent pixels, images
generated by Java programs will be smaller when they are displayed on high
resolution displays": Not in Java2D
I could go on but, I think that is a representative sample.
-- Dale King My Blog: http://nobleware.homedns.org/Blog
- Next message: wEEdpEckEr: "String.replaceAll() with regex?"
- Previous message: JamesY: "Outputting value of variable during execution"
- In reply to: Roedy Green: "Re: points vs pixels."
- Next in thread: Roedy Green: "Re: points vs pixels."
- Reply: Roedy Green: "Re: points vs pixels."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|