Big Big Question with a lot of Funk!

Hey people!
It's been quite a while since I visited these forums. I've actually been working on my game, Platformisis, and I was doing real good until I ran into some problem flipping images. Yes, I did look at the tutorials but there is one thing that I don't get. How does this piece of code work?
AffineTransform Transformer = new AffineTransform();
Graphics2D Surface = ?; // This is given.
Image Picture = ?; // Given also.
Transformer.scale(-1, 1);
Transformer.translate(-10, 10);
Surface.drawImage(Picture, Transformer, null);What I'm understanding here is by putting a minus sign next to the 1 in the scale routine the image is being flipped. Right? Now I want to draw the image to location (10, 10) but in the tutorial I saw a minus sign in front of the X coordinate. I don't get this. Normally wouldn't this draw the image to (-10, 10)? Is there something that I'm missing here? I'm giving Duke Dollars to the best answer.

Affine transforms are stored in a matrix. If you take a point, multiply it by the matrix, your result will be the transformed point. Now, if you want to do mutliple transforms, you can mutliply all the transform matrices together to result in one single matrix. The order of the matrices is preserved. Points multiplied by this matrix will have all the transforms applied to it in the order they were mutliplied in.
Knowing that, if you take the matrix for scaling then multiply in the matrix for the translation, you'll end up with what you would expect - scaling the point then moving it. However, since they are mutliplied in reverse order, the translation is first in the transform string, so the scale is applied to the point after it has been translated. Since the scale flips horizontally, the negative x translation will become positive, placing the point where you wanted it.

Similar Messages

  • Big question with ipod library HELP

    i had a new itunes library with NOTHING on it, i had all my 600 some songs in a folder i hit add folder, with all the songs, and in my itunes library it all goes in and i can play EVERY SONG, but on my ipod it says theres every song on there, but in the recently added it says only 94, so basiclaly i only have 94 songs i synced over and over again, idk what is going wrong, someone please HELP im going nuts

    Recently added shows songs added to the iTunes library in the last two weeks. It does not show songs newly added to the iPod.
    Don't know what you are looking to happen.

  • Ways to optimize big product catalog with a lot of characteristics

    Hi,
    B2B with SO. We have product catalog with a lot of products.
    All products have a lot of characteristics.
    Which methods are exist for optimize works with big catalog?
    For example, how we can deactivate part of un-used characteristics?
    Denis

    Ive been having hell with this aswell, although i think my computer is to blame. It "should" work if i could install wmp, but i cannot because my computer needs me to install some update rollup 2 which doesnt install and i cant install sp3 either... i've been contacting microsoft but they cant sort it.. maybe my pc is just reaching its old age and cannot cope with so many new things going on.
    but from what you have said i cant see why it shouldnt work with your current system.

  • Preloader and Document Class BIG question (yeap please help)

    Hy,
    I know that this its a question posted many, many times, but
    after searching the net, reading a lot of books and searching this
    forum too, I cant get out with a solution. If I'd say for sure
    there is no possibility to create something like this, I just go
    back to old methods but is not the scope of Adobe with AS3 to
    encourage the use of OOP principle or not?
    The problem:
    I have a single fla file (AS3) with a single frame on
    timeline, frame that its there when you will create the file with
    flash. In the library I have different symbols, that for simplicity
    are only jpg image, (BitmapData) checked for export for
    ActionScript and exported on frame one. An external .as file called
    DocumentClass its off course my Document Class
    This its all that I want to do with the fla, the goal its to
    create, animate etc. only with AS3 in external classes, no timeline
    script. I don't want to load external files, XML, or else in this
    movie. I just want a single swf after compilation, no additional
    files.
    Ok, how do I create a preloader that will take care of
    starting the logic after the whole swf its loaded and in the same
    time shows the user a percentage or a load bar or something that
    its not the blank screen when the swf its downloading. I want to do
    this without another swf that load this swf, or timeline scripts,
    or place all the content on second frame and then gotoAndStop to
    the third frame. All this are not solution but cheap tricks, that
    are against all this OOP principle that I just continue to read in
    books and here from guru programmers.
    The big question is:
    It is possible to create a preloader, when use a document
    class with your fla? And if yes, how?
    I know that the Document Class its not instantiated if its
    not fully loaded, if that's true when the document class will be
    fully loaded? maybe after the whole movie its loaded? And, if its
    true, it will never show a percentage bar "while" the movie its
    loaded. And if that's true WHY use a document class anyway?
    Thank you for reading this and I really wait to get some
    answer.

    I am pretty sure you cannot do self preloader with one frame
    and all the objects in the library. I guess the key here is
    one-frame design. Screen refreshes (renders) only when all the
    scripts in the frame are executed - this is a very important thing
    to understand about how Flash works. Yes, you can force screen
    refresh with updateAfterEvent() method but it is attached to a
    handful of events only (MouseEvent and TimerEvent) but, again, all
    this functionality is available only after first frame scripts are
    executed. Thus, it seems like the only way to create preloader from
    within SWF is to use multiple frames and set library objects to
    load in later (not first) frame.
    quote:
    And if that's true WHY use a document class anyway?
    Well, preloader is the last thing that would be on my mind in
    terms of using AS3 ability to link DocumentClass to the top movie.
    This feature allows for very sophisticated architectural
    approaches. It has no connection to preloader as to any other
    features developer wants to implement. Neither it depends on or
    negates timeline. As a matter of fact, although I love one-frame
    applications, I find on numerous occasions that my application
    would be more efficient if I used several (at least two) frames.
    gotoAndStop is not deprecated. It is a valid MovieClip class'
    method. After all, having only one frame doesn't mean not having
    frames at all - there is one already. Frames are fundament of
    Flash. AS3 did introduce frameless entities like Sprite, etc. but
    it doesn't mean that frames are going anywhere.
    I would agree that timeline code is inferior to
    classed/packaged (read: better organized) code but, still, how is
    it not OOP? Frame is an Object, right? Why using timeline is cheap
    and not a solution?
    On a side note, I see too many times how some authors (and
    managers) are pushing their agenda (or close mindedness) onto their
    audience with no real substantiation. Claiming that timeline in
    Flash is not valid architectural decision from OOP standpoint is
    totally wrong. As wrong as strict adherence to design patterns. I
    don't think there is sharply defined "right" or "wrong" in
    programming. One finds the best optimal solution. The goal is to
    create something that works fine. Unless, of course, the process is
    the goal - but very few of us can afford focusing on the process.

  • BIG Question to Nokia for 3G Speed Issue

    I bought Nokia asha 311 before 1 month and i am not getting 3G speed.
    From the day i bought this phone i am getting around 200KBps speed ONLY.
    I tried all the networks and different places but the issue is same.
    When i sent nokia care an email they told me that check weather any background app is running or not but i know what i am saying and i am technical guy i know my stuff very well.
    As consumer's duty i checked all the possible options from my side but the issue is same.
    Nokia care told me that go to nearby nokia care shop and get it checked.
    I went there and they told me that phone is fine but still we'll update the firmware to see if any change happens.
    They updated the firmware and the internet speed was same.
    After this and all the discussion with nokia care exe. he told me that This NOKIA ASHA 311 mobile doesn't have that 3G class to give HIGH SPEED 3G internet!!!!!
    I was shocked with this answer. I bought this mobile after analysis as my primary requirement was to use this phone's inbuilt 3G modem which supports 14.5MBps downloading speed(according to Nokia's promotional listings) and now after hearing this from that nokia care executive i am totally shocked and left his shop.
    Today i again sent email to nokia care (from nokia's website) to see what they say now.
    If things didn't go well then i don't have any choice then placing a BIG CONSUMER COURT REPORT against nokia to not list what they don't provide(in this case its 3G speed)
    They shown in advertisement and everywhere and also on Nokia.com website too that this phone supports 14.5MBps downloading speed and has HSPA so there should be no question with browsing/downloading speed but now I NEED ANSWER.
    Resolve or face the consumer behavior.

    Just to clarify, I do not work for Nokia, but rather just drop by here once in a while. 
    Claims that "a friend is getting" may only be you're friends claim. In the court of most modern law, we call it HEARSAY.
    Most people cite technical specifications and factors, but the reality with the mobile Internet, is pretty basic.
    For wireless connectivity, imagine this very ideal setting:
    Your phone is about 4 inches in size with a 3 inch battery and fits snugly in your hand. Take your pick, any brand, any carrier or provider, they are all the same. Wifi, bluetooth, 3g, 4g, still the same.
    A cellular tower is about, lets give it a nice rounded figure of 100 feet high towering high above.
    A typical cell site should be a few kilometers away, lets say you have full bars within a radius of 5km
    Now we have many scenarios possible: 
    The Internet is not about just DOWNLOAD or  retrieving information, one very overlooked factor is UPLOAD or sending. One does not magically conjure a website without requesting for it.
    It is always two-way traffic for the Internet. If the requesting party has a weak signal, either packets (or bits of data) are lost along the way to the cell's tower, the reply from the tower may also be sporadic or slow. 
    Why?
    Going back to physics, it's 4 inch phone versus 100 foot tower.
    You are holding a tiny phone trying to send data to a device many, many kilometers away. The cell site may be streaming you 100% full strength, but with the Internet, you have to take into account your own signal sending back.
    EMI's or electromagnetic interference. - packets of data are sent across servers in almost pristine condition across the globe via fiber optics, but once their holiday trip rides the imaginary airplane and flies through the air as packets of data, they also encounter MILLIONS of other packets of data from other mobile phones, wifi hotspots, radio stations, even echoes of the Big Bang (yep, seriously) emenating from outer space.
    So Imagine your phone as a post office, and it has to sort through all of those millions of packets and only let yours which has been authenticated in.  You are technically recieveing everyone else's packets of data and in an area congested with a lot of wireless traffic, your phone has to work extra hard to sort which is which. 
    A well placed microwave often, in fact, can kill any wireless signal. Waves, physics and all those sorts of things are complicated to explain you need not worry about them on a consumer level. Not even Einstein can tame it, so nothing much we can do.
    That's only two variables in a multi-variable situation in troubleshooting slow browse connectivity. A ping test or bandwith test from sites such as speedtest.net will only provide a benchmark and basis for network engineers to troubleshoot but does not reflect your actual speed or QoS.
    And since I brought the term up, you can also contact your provider about the QoS or the speed plan your are currently signed up or paying for. Like here in Time Warner Cable, even if our customer has the fastest modems around if they are subscribed to the 30mbps plan, they'll never get 50mbps because of the simple fact they are not paying for that subscription, or as we in the industry call it, QoS.
    If you are getting less than the bandwidth in optimum conditions, it is definitely provider-side issue.
    I am sorry if my sarcastic sense of humour (well, that's just who I am.) may not play well with some cultures. But I hope I have enlightened others who are also wondering as well. 
    Again, disclaimer, I do not work for Nokia.
    I am also a consumer, trying to look for a fix for my phone that keeps crashing, much like most of us ended up here looking for answers.
    My personal suggestion is, if you don't like the phone, return it or resell it on ebay and buy a higher end phone.
    Price = Performance.
    - Time Warner Cable Roadrunner High Speed Online Internet Web Guru -

  • Big Question on JSP

    hello jsp coders...i have a big question for you all it goes as follows.
    I have been developing e-commerce/web solutions using the java programming language through applets..that perform high end client/server..e-commerce solutions, and there has not been any problems encountered so far.
    Now the java J2EE platform has a lot of resources for web developers..e.t.c..one of which is the JSP or JavaServer pages and Servlets..now having gone through these latest technologies..i want to ask java/jsp gurus..whether there is a gain in moving to jsp from java applets...what benefits/advantages would one benefit from such migration...plus all the additionalities...and also any sun resource/technical documentation/tutorial/books that specifies more on jsp.
    I would really appreciate it.
    Thanks in advance.

    When you move from a client/server system design to an intranet/web-based design sans-applets, you get these benefits:
    1. No software to load on the client computers!!!
    2. Users can access their applications from any computer.
    3. The user should/might/could see a speed increase.
    These 3 reasons, above all others, was why we decided to remove applets from all of our web pages.
    The downside is that you are stuck with using only html input fields, list boxes, etc. No more fancy JTables. You will also need to get jiggy with JavaScript.
    P.

  • Hi I've a big problem with adobe acrobat reader XI pro and I hope you can help me. The problem is; when I past copied text from some pdf books (not all of them) it past symbols only! wherever I past it! and even if I coped that text from another pdf reade

    Hi
    I've a big problem with adobe acrobat reader XI pro and I hope you can help me.
    The problem is; when I past copied text from some pdf books (not all of them) it past symbols only! wherever I past it! and even if I coped that text from another pdf reader (adobe pdf reader, internet browsers, ...etc.).
    This problem started to happen since yesterday when I installed adobe acrobat reader XI pro to try it before I buy it, and before that when I was using the free adobe pdf reader I was totally able to copy any text from any pdf and past it anywhere with nothing wrong.
    What can I do?
    thank you a lot.

    There is no product called Adobe Acrobat Reader Pro. There is
    - Adobe Acrobat Pro ($$)
    - Adobe Reader (free)
    Which do you have? And are you a programmer?

  • The Big question...

    I am currently running windows XP, using a 20” Phillips flat screen as my monitor. I have no issues what so ever with this monitor using XP. I am running from the VGA out on my laptop (company PC, IBM) straight into my monitor. TV DVI is type DVI-I.
    I want a Mac Mini!!! So… The big question is.. Will I be able to use this monitor? As stated above, I have no issues with XP. The Mini comes with a mini DVI to VGA adapter. Shouldn’t I be able to plug right into this adapter and go using the cable I already have?
    Thanks much!
      Mac OS X (10.4.9)  

    Welcome to Apple Discussions!
    Indeed, given the presence of a VGA connector on the monitor and the DVI/VGA supplied with the mini, you should be able to plug the two things together and have them work with no problem. Unfortunately, without knowing the exact model of screen and there being someone posting here that has tried the same combination, it's impossible to tell you with absolute certainty that it will work - very high probability, but not certainty.
    How readily the combination works depends to a great extent on whether the display outputs a standard signal which identifies it and the settings it requires, such that the mini can detect it. If it does, it'll work and offer you a range of suitable and compatible settings. If it doesn't, you may need to use a third-party utility such as SwitchResX - which isn't easy but many have used with success.
    If the display also has DVI input, that's another option too of course.

  • Big problem with receiver

    i've been having a big issue with my receiver i just purchased a yamaha rx-v463 and i got that with the klipsch speakers and sub. the problem is that i connect my high def cable box and ps3 and when i switch to play games and watch movies on the receiver it doesn't show the picture and it keeps flashing pcm what can be causing this

    I would recommend going though your menu system.  Many systems require you to specify what kind of connection to use for each audio and video source.
    Since it is flashing PCM, you may need to tell where to look for your audio signal (i.e. Coax or TosLink(SpDif))
    I do not work for Best Buy and am not affiliated with them in any way. I like HT and want to help people improve their HT experience. "There is a LOT more than just having a TV to make a home theater"

  • I wanna make a ingame-purchase. . But i have a big question.

    Hello guys, Kindly help me out with this big question..
    I want to make a in-game purchase of 'Heros O&C' Cause i wanna make purchase.. I secretly make another iTunes acc.
    iTunes acc is mine, but App Store is under my dad account.
    So if I make the purchase, will it notified my dad too about the purchase ?
    Kindly reply me asap ! Thank you very much

    Thanks for the help. But now i have a problem.. 'The Purchase Could Not be Completed' I encounter this problem.. i tried contacting.. but they give me link to my problems that did not helped me.. Do you have any idea how to make purchasable again?

  • Helloo! I have super big problem with my Air.

    Helloo! I have super big problem with my Air,10.8.5 ,it asks every 10 sec to make some changes and asks me for password all the time!! I cant acces my documesnt,pics,music,NOTHING at all! Finder is not working,i cant open any folder,icons are missing also,i cant open any of them,mozzila,chrome..im really going crazy.. i updated tonight my phone on new IOS 7 through my comp,cant be that i messed up everything because of that..this comp.is like 10 days old.
    btw. i created new user,and everything is working ok.

    Back up all data. Don't continue unless you're sure you can restore from a backup, even if you're unable to log in.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. To do that, unlock the preference pane using the credentials of an administrator, check the box marked Allow user to administer this computer, then reboot. You can demote the problem account back to standard status when this step has been completed.
    Triple-click the following line on this page to select it. Copy the selected text to the Clipboard (command-C):
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -R $UID:staff ~ $_ ; sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2> /dev/null
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password. Nothing will be displayed when you type it. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1 or if it doesn't solve the problem.
    Boot into Recovery. When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window will open. You’re not  going to reset a password.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • Having big problems with Creative Zen Micro Photo!! I need much urgent help!

    Hi. I am having a big problem with my MP3 Creative Zen Micro Photo device at the computer.Here is the thing:Before I bought this I had the regular Zen Micro & having fun with it. I had no problems with that when I used the Media Explorer to transfer songs. So I bought the Zen Micro Photo & installed it my computer. As normal I used the Media Explorer to transfer songs & pictures.So I reinstalled Windows XP at my computer, and when I installed the CD that followed to transfer new songs, the Windows said that it's an unknown thing I have connected in the USB.So I installed Service Pack & 2. I have tried to install drivers from the cd but it seems that there are no drivers on the cd! The big problem is that when I connect the MP3 to the computer, it doesn't read it's a Zen Micro, it's just unknown! So the Zen Micro Photo Media Explorer program doesn't work & I can't transfer songs or picture on it! And it just happened after I re-installed Windows on my computer. The same thing happened on my brother's computer after he re-installed windows. And when I connect the MP3 to the USB, it says that it's not a USB 2.0, but .! And I am sure it is 2.0 because it has always been like that before I re-installed windows. Also the MP3 does not re-charge when I put it my computer! The battery is just the same, it tries to do it but it doesn't. So I am using my sisters computer to charge the MP3 & transfer songs. I have tried everything but I can't seem to understand what the problem is? I have never experienced something like this before, and I really hope you can help me with this! To be honest I think what I am missing is the driver. So can someone PLEASE provide me the link for the driver? I have downloaded all those 3 on www.creative.com, but they are none of them! Also that playforsure firmawre thingy does not work because it sais that I have to connect my MP3, and it is connected already!Please reply as quick as possible! Thanks a lot for you kind help!
    I have also sent this mail to creative support! But please help me I have had this problem for almost 2 months now! =(Message Edited by anakwalajinn on 05-0-2006 08:47 PM

    Might try this:? http://forums.creative.com/creativel...mp=true#M95059

  • I have a big problem with my Iphone 4...the pics and videos that i capture, often shows as inverted or orientted by 90/180/270 degrees. photos, one can rotate, but how about videos... is there any way i'm going wrong? this wasn't happening earlier

    My question...
    any answers pl.
    I have a big problem with my Iphone 4...the pics and videos that i capture, often shows as inverted or orientted by 90/180/270 degrees. photos, one can rotate, but how about videos... is there any way i'm going wrong? this wasn't happening earlier

    If I've understood you correctly then the ALLEXCEPT function may be what you're after and it could be applied in a similar way to the following...
    =
    RANKX(
    ALL(Table1),
    CALCULATE(
    COUNTROWS(table1),
    ALLEXCEPT(Table1, Table1[ContactReason])
    DENSE
    If this has missed the mark, would it be possible to clarify the requirement further?
    Regards,
    Michael Amadi
    Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to vote it as helpful :)
    Website: http://www.nimblelearn.com
    Blog: http://www.nimblelearn.com/blog
    Twitter: @nimblelearn

  • Shame on such a big company with no live help when you need it!!!

    had to delete firefox and reinstall it. in doing so, i lost all of my bookmarks. when i follow the instructions on how to restore it, and the dates drop down, it is only giving me the last couple of days. it is not giving me an earlier date. and after reading the help answers, i have come to the conclusion that all my bookmarks which i use about 85% of them on a daily basis are GONE !!! FOREVER !!! shame on such a big company with NO live help !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! SHAME SHAME SHAME

    Hi,
    The people who answer questions here, for the most part, are other Firefox users volunteering their time (like me), not Mozilla employees or Firefox developers.
    If you want to leave feedback for Firefox developers, you can go to the Firefox ''Help'' menu and select ''Submit Feedback...'' or use [https://input.mozilla.org/feedback this link]. (You'll need to be on the latest version of Firefox to submit feedback). Your feedback gets collected at http://input.mozilla.org/, where a team of people read it and gather data about the most common issues.

  • Since Nov 11 we have very big issues with our emails received via exchange server. Part of them are empty

    Since Nov 11 all Iphone and Ipad of our company have very big issues with email synchronization. We all synchronized with Exchange server.
    In the past nobaody had issue.
    Some of our users have IOS 6 and others IOS 5
    Messages arrived empty and it is impossible to download them.
    Nobody is able to answer ????
    I have the same issue with my personnal Ipad synchronized with exchange also.

    This resolution have to attend at the server not with the ios device. My employer's mail administrator reject me to correct it from the server. As his concern is, if ither ios devices works why don't mine? So I am helpless than changing my iphone. It works fine for early versions of ios and with androids. And also one of my friends iphone4 with ios 7 (similar as mine) works too. So I guess it's something wrong with my iPhones settings. But basic question I cannot understand is it works in my phone before this ios7 upgrading. And currently working with my yahoo account too. Favourable reply expected.

Maybe you are looking for