More than 1 pixel width for java.awt.Graphics between coordinates

  • Thread starter gimme_this_gimme_that
  • Start date
G

gimme_this_gimme_that

How can you use a Graphics object to create lines more than one pixel
in width?

Thanks.
 
H

hiwa

(e-mail address removed) ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸:
How can you use a Graphics object to create lines more than one pixel
in width?

Thanks.
Use java.awt.Stroke and its descendants.
 
T

Thomas Weidenfeller

How can you use a Graphics object to create lines more than one pixel
in width?

Hope that it is actually a Graphics2D object (like it is in reality in
Swing paintComponent() methods, cast Graphics to Graphics2D and use the
Java2D API to paint lines of different types.

/Thomas
 
V

Vova Reznik

How can you use a Graphics object to create lines more than one pixel
in width?

Thanks.

More than 1 pixel in width line is rectangle.
See Graphics#fillRect(int, int, int, int)
fill3DRect(int, int, int, int, boolean)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top