guidebee

November 25, 2009

MapDigit Graphics 2D Rendering

Filed under: Uncategorized — guidebee @ 12:15 pm

The core class of the Graphics 2D API is com.mapdigit.drawing.Graphics2D class,similar to class javax.microedition.lcdui.Graphics, but provide access to the enhanced
graphics and rendering features of the Graphics 2D API. These features include:

  • Rendering the outline of any geometry primitive, using the pen and brush attributes(draw method).
  • Rendering any geometry primitive by filling its interior with the color or pattern specified by the brush attributes (fill method).
  • Rendering any text string (drawString method). The font attribute is used to convert the string to glyphs, which are then filled with the color or pattern specified by the brush attributes.
  • Rendering the specified image (drawImage method).

In addition, the Graphics2D class supports the Graphics rendering methods for particular shapes, such as drawOval and fillRect.
All methods that are represented above can be divided into two groups. First group contains methods to draw a shape. Second group contains methods to affect the rendering. The last group operates with a term attributes.

 

You can modify the state attributes that form the Graphics2D context for followingpurposes:

  • To vary the stroke width (Pen)
  • To change how strokes(Pen) are joined together
  • To translate, rotate, scale, or shear objects when they are rendered
  • To define colors and brushes to fill shapes with

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.

Design a site like this with WordPress.com
Get started