View unanswered posts | View active topics It is currently Mon Feb 27, 2017 3:03 pm



This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
 Textured Ashapes 
Author Message

Joined: Tue Jul 27, 2010 3:59 am
Posts: 7
Post Textured Ashapes
I'm using the ActivityAshapeBean and I was wondering if I can use textures instead of Java Colors to paint it? Ashape has a method paintShape, and ActivityAshapeBean has methods addSubShape and removeSubShape. It there a way to override paintShape and plug it into ActivityAshapeBean? If possible, any example code would be appreciated.

Thanks for the great product!


Thu Oct 27, 2011 6:47 pm
Profile
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post Re: Textured Ashapes
Hello,

Please submit a support ticket from our site.

Thanks,


Thu Oct 27, 2011 6:59 pm
Profile WWW

Joined: Tue Jul 27, 2010 3:59 am
Posts: 7
Post Re: Textured Ashapes
I was able to do it using static overrides.

ActivityInteractor.setStaticOverride(prefix + AShapeUtil.DEFAULT_BACKGROUND_SHAPE_NAME, AShape.A_PAINT, new OverrideFilter() {

public Object getOverride(Object subject, Object defaultObject) {
Color color = DEFAULT_CLIENT_APPOINTMENT_COLOR;

//textures
BufferedImage bufferedImage = new BufferedImage(8, 8,
BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = bufferedImage.createGraphics();
g2.setColor(color);
g2.fillRect(0, 0, 8, 8);
g2.setColor(GfxUtil.getCrossColor(color, color.darker(), 0.15f));
g2.fillOval(0, 0, 8, 8);
Rectangle2D rect = new Rectangle2D.Double(5, 5, 8, 8);
return new TexturePaint(bufferedImage, rect);


}
});


Tue Nov 01, 2011 10:23 pm
Profile
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 3 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.