Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

AffineTransform in J2ME

Posted on 2004-08-23
13
Medium Priority
?
829 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:dr0zaxx
ID: 11883136
Write my own rotation? Sounds impossible, since J2ME does not support trigonometry.
0
 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

719 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