Solved

Java2D scale help

Posted on 2006-11-11
3
405 Views
Last Modified: 2013-11-22
Hi,
    How come when I use g2d.scale(x,y), it moves my object to another location? How do I bring it back to the original location? thanks!
0
Comment
Question by:azcalv408
3 Comments
 
LVL 92

Accepted Solution

by:
objects earned 75 total points
ID: 17924372
because the scaling is relative to 0,0
you nned to 1st translate it so it is centred around origin, scale it, then translate it back.
0
 

Author Comment

by:azcalv408
ID: 17925853
sorry for late reply...do you think this is the same for rotation and shear? thanks
0
 
LVL 6

Expert Comment

by:SamsonChung
ID: 17931587
YES

Think about X,Y coordinates......

start point, end pt, you will have to translate it back and forth with formulars......
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
Python Assistance 7 72
how to send memory stream from ics Client To ics server ? 11 80
eclipse argument 14 53
Firemonkey webbrowser scrollbars ? 1 29
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

919 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

20 Experts available now in Live!

Get 1:1 Help Now