Errata

Java 2D Graphics

Errata for Java 2D Graphics

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 27
Bottom

Hi Jonathan,

your wrote: "Why use floats instead of doubles? If you have special concerns about
the speed of your app. [...] you might want to use Point2D.Float."

It is not sure that float is faster than double. For some implementations of JVM the
datatype float is slower than double, because float is internally converted to
IEEE754-double and afterwards to the internal represenatiton for the processor

Anonymous   
Printed Page 39
setLine() methods description at bottom of page

Descripton of first setLine() method shows incorrect parameter arguments per
Sun's API documentation.

As is reads:

public abstract void setLine(double x1, double x2, double y1, double y2)

Should read:

public abstract vaoid setLIne(double x1, double y1, double x2, double y2)

Anonymous   
Printed Page 79
End of 1st paragraph

The erroneous sentence says: "First it strokes the outline and fills the
interior of a circle using a partially transparent color:".

It should say: "First it fills the interior and strokes the outline of a
circle using a partially transparent color:".

Anonymous   
Printed Page 80x87
. The Streaming SIMD Extensions for the Intel Pentium III admits

operations on IEEE-754 Single-precision 32-bit real numbers --- but there is no JVM
implementation I know that uses SIMD-Exentions.

For the most modern implementations the speed for double and float is equal and there
is no significant distinction.

The only reason I see to use Point2D.Float is only memory consumbtion. One would save
4 Byte per Object.

Anonymous