• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Creating Arrow Icon Help

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Is there anyway to make an arrow Icon that looks good? I tried making one, but it doesn't look any good. Like the lines are not smooth (if you can say so), or like you can see the pixels.
Is there anyway to fix this? And Yes, I do need it to be an Icon.

The commented code are code to add a line at the edge of the arrow, making it a two colored arrow, one color at the edge, and one filled inside the arrow. But after doing that, the arrow became even more messed up.

Please help.

 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
have a look at the code for BasicArrowButton
 
Alexander Walker
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Michael Dunn wrote:have a look at the code for BasicArrowButton



Thanks it helped a lot. I was able to do what I think is a pretty decent arrow.

Heres the code for it, for those who want it.

 
Alexander Walker
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I updated the code to make the arrows look better, and I made two versions, one where the width and height is the same. And one where the width is twice the size of the height. thought I should share them, They look nicer then the last version anyway.

Edit: I forgot to remove "g.translate(x, y);" in paintIcon




 
Yeah, but how did the squirrel get in there? Was it because of the tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic