Drawing Image at different axis

Posted on 2005-05-08
Last Modified: 2010-03-31
Hi guys, this is more of a theory question but I'm trying to figure out how to draw an image out of the 0,0 axis.

when i draw the image, it seems to draw it at the upper left most corner? is there any way to draw the image anywhere on the applet but also have the entire applet available for that image?

drawImage(int,x,y,observer) where x and y are both set to 0 and if i change those numbers to 300,300 on a 600,600 applet, it'll draw the image space won't exist in the upper left hand corner.

hope my question made a bit of sense.
Question by:fuzzyfluid
    LVL 86

    Accepted Solution

    If you set a transform on the Graphics instance, you can set the translation:

    Author Comment

    Thanks for the advice. I'm toying with the idea right now.

    if it's not too much trouble, because i just want to make sure we understand each other --

    with transform,translation,and scale -- i can draw an image starting at a different origin, and possibly even take a piece of the image and scale it up onto the whole canvas?
    LVL 86

    Expert Comment

    LVL 86

    Expert Comment


    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Suggested Solutions

    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…
    Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
    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…
    This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

    729 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

    19 Experts available now in Live!

    Get 1:1 Help Now