Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Highlighted
New Developer
Posts: 6
Registered: ‎08-18-2008
My Device: Not Specified
Accepted Solution

setClip and getClip functions in Blackberry

 Hi All,

 

Im converting from J2ME code to the Blackberry code.

 

Could any one please help me in converting the corresponding j2me graphics functions

using  Blackberry Graphics object 

 

   g.setClip(x, y, dx, dy);
   g.getClipX();
   g.getClipY();
   g.getClipWidth();
   g.getClipHeight();

 

If there is no direct solution, please suggest the alternative way to acheive this. 

BlackBerry Development Advisor
Posts: 15,211
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: setClip and getClip functions in Blackberry

The Graphics.getClippingRect() method can be used to get the clipping region.  This can not be modified on a BlackBerry Graphics object.  Instead, you can specify a clipping region when marking a section to be redrawn.  Have a look at the Screen and/or Field.invalidate(int x, int y, int width, int height) method.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker