Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Creating Arrow Icon Help

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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




    Bookmark Topic Watch Topic
  • New Topic