Solved

AffineTransform in J2ME

Posted on 2004-08-23
13
819 Views
Last Modified: 2013-11-23
Hi guys,

Is it possible for J2ME applications to perform AffineTransforms? I am looking for methods that deal with rotation (free rotation, meaning any degree can be specified) and transparency. But apparently, there is nothing in the API specifications.

Is there any free third-party graphics library that I can download in order to perform such operations? Or can I write it myself easily? I am currently working on my final year project, so I do not have any budget to purchase anything.

Thanks in advance for any help.
0
Comment
Question by:dr0zaxx
  • 5
  • 3
13 Comments
 
LVL 35

Expert Comment

by:TimYates
ID: 11878715
0
 
LVL 1

Author Comment

by:dr0zaxx
ID: 11878800
I apologise for not phrasing my question properly. I am trying to perform affinetransforms when drawing shapes using the Graphics class. I cannot use the Sprite class because I have no images. Also, it only allows rotation of multiples of 90 degrees.
0
 
LVL 35

Accepted Solution

by:
TimYates earned 500 total points
ID: 11878956
No then, there isn't anything :-(

You'll have to rotate your points for your shapes yourself, and for transparency, I'd have a look at the API for the phone you are developing for...  There should be something in there...

That is, unless anyone else knows of a proper way of doing this?

Have you posted a link question for 20 points in http://www.experts-exchange.com/Programming/Wireless_Programming/ with the URL of this question in it?

Someone over there might be able to help?

Tim
0
 
LVL 1

Author Comment

by:dr0zaxx
ID: 11883136
Write my own rotation? Sounds impossible, since J2ME does not support trigonometry.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 35

Expert Comment

by:TimYates
ID: 11886880
http://home.rochester.rr.com/ohommes/MathFP/

is a J2ME floating point math library...
0
 
LVL 15

Expert Comment

by:jimmack
ID: 11887608
That's a fixed point library ;-), but it's probably about the best you'll get.  You may find that it's easier to provide some lookup tables for the trig functions for specific angles rather than to try to handle completely free rotation.

Just a thought.
0
 
LVL 1

Author Comment

by:dr0zaxx
ID: 11888697
Ok basically I have found the fixed point library very useful. Now how do I go about using this class to perform rotation (I guess trigonometry is needed)? My mathematics is pretty bad, so pardon me. :)
0
 
LVL 35

Expert Comment

by:TimYates
ID: 11889869
Can you post some of your code?

The bit that does the drawing?

Tim
0
 
LVL 35

Expert Comment

by:TimYates
ID: 12248441
I think I deserve the points, as " No then, there isn't anything :-(" is a valid answer..
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Modeling a class in java 5 45
best (free) software to access postgres db (java) 1 32
nextBoolean(double p) for Random class 3 35
use lov values 2 18
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now