Polygon drawn with CG gets distorted after a UIView animation.

Hi all,
I've managed to draw a polygon on an UIView with a helper function that gives me an array of CGPoints which I loop through going CGContextAddLineToPoint.
I can rotate the polygon by applying a CAAffineTransformMakeRotation object, I have a UIButton associated with a rotate function and it works fine.
Problem is if I move the UIView down (as with a UIView beginAnimations) and the polygon is rotated in any manner, I can see an animation of it being distorted and disappearing!
Any clues???

G'day mate! My favorite San Fran radio station is currently running a 60 sec. travel commercial featuring an authentic Aus announcer (or crocodile hunter) along with an American translator. The idea is to teach us to speak Australian before we get there. I'm a slow learner, but maybe by the time I learn Obj-C I'll know how to ask for directions to Queensland.
No, I've never been a student at Stanford. CS 193P, last autumn, was given through the Stanford Center for Professional Development, so you didn't need to be a regular Stanford student; an application to the graduate school was required, but all the lectures were on video and I don't think you ever needed to be on campus to complete the course. I think the full tuition was over $3000. I would have gone for that if it had been a live class with the opportunity to ask questions. But I was told questions could only be asked by e-mail and those might or might not be answered in the recorded lectures. I didn't even ask my employer to pay for the class since my job was to develop Win32 apps. At the time I wasn't willing to confide a secret desire to become an iPhone programmer.
Anyway.. (I can't wait to see the comments about people who litter this forum with their life story) I haven't yet built a test bed to try out your code, but you are indeed moving your subview by resetting the frame. Note the warning in the doc: "If the transform property is not the identity transform, the value of this property is undefined" [https://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIVie wClass/UIView/UIView.html#//appleref/doc/uid/TP40006816-CH3-SW5].
Try adding a translation to the current transform like this:
CGAffineTransform t1 = myPolyView.transform;
CGAffineTransform t2 = CGAffineTransformMakeTranslation(x, y);
myPolyView.transform = CGAffineTransformConcat(t1, t2);

Similar Messages

  • XBMC: HDMI audio starts out OK, then gets distorted after few minutes

    Hi,
    I have posted about this on the XBMC forums, but one of the developers kindly informed me that they do not support XBMC on Arch Linux in any way, so I should take my queries elsewhere. I am hoping that someone here might be able to shed some light on my issue.
    I am trying to use XBMC 13.1 (xbmc-13.1-2) with Samsung EH5300 32" Smart TV (2013 model) over HDMI connection. The HTPC computer is AMD-based (AMD A4-5300 APU, which includes Radeon HD 7480D GPU), and runs an up-to-date Arch Linux (last full system upgrade on 2014-06-26). I am using the open source "radeon" driver (xf86-video-ati-1:7.3.0-1). Everything has been great except the sound:
    The sound starts out fine, but a few minutes later it begins to get distorted. At first it sounds like reverb affecting voice only, but with time the distortion increases until it sounds kind of cued TV noise. If I restart the video, the sound works again for a while. If I change options in Settings -> System -> Audio Output, like the number of channels or pass-through, the sound is again good for a little while. If I enable or disable "Stereo Upmix" or change audio stream from the "Audio - Settings" dialogue window available during video playback, it too seems to "reset" the sound to sounding normal for a while.
    Has anyone seen something like this?
    I have tried different videos, and it seems like HD videos are affected more than SD videos, starting with distortions only a few minutes in (except the one Xvid video, which was fine for 15 minutes). Some SD videos are completely fine, some start having distortion issues only after 20 minutes or so. Judging from video information, if the video uses 5.1 channels (all HD videos fall in this category), it definitely gets distorted; if a video only uses 2.0 channels (like the SD videos), some are fine while others get distortion later on. I have "Number of channels" in Audio Output settings set to 2.0. Changing this (or any other audio settings) has not affected the distortion.
    Following Arch Wiki: Radeon note about HDMI audio, I tried adding radeon.audio=1 to the kernel line; this did not solve the issue, just added some visual glitches.
    In the XBMC debug log I posted, the distortions happen at around 17:26, though there is absolutely nothing logged at that time, even though I enabled "Verbose logging of AUDIO component" in the Debugging settings. The video I was playing there showed the following in the information window: 720 H.264 dts 5.1 16:9.
    Any suggestions, ideas, or experiences would be appreciated. It definitely seems to be XBMC issue, since I was able to play the same HD video through mplayer without any problems (for at least half an hour, which would have already showed distortions several times through XBMC).

    Hi GDykes,
    OK Imagine that Connection speed from your ISP is like an empty freeway. You can go full tilt (upto that road's speed limit)
    Bandwidth is like a busy freeway where you only get to go as the bit you are in allows.
    Reducing the Bandwidth in iChat or in the System Preferences > Quicktime > Streaming tab is like a vehicle that has a maximum speed that is slower than the speed possible on the freeway.
    10:02 PM Friday; July 6, 2007

  • Any one has problem with notes getting deleted after a week ?

    After upgrade to iOs 7, my new notes that I wrote on icloud or email are deleted after a week. I  have to take note again and again, first i did not notice because i thought i was accidently deleted, but then a week later i lost the new notes again. All old notes are ok, it just happen to new notes after iOs 7. Pls help

    try SUS and reinstall it again

  • Clips are getting distorted after rendering a color grade; any solutions?

    I've been experiencing this problem as I've been learning to color grade.  Once I have all of my layers set the way I want them (initial correction, color alteration, masking, and sometimes adding a vinette) and I go to render, my clip will become completely distorted.  Is there any solution to this when it happens, or will I have to restart the grade completely?  Could there just be something I'm doing wrong in my workflow?  I'm open to any and all answers.

    Pure guess, do you have set in preferences high quality in playback.

  • Problems with contacts getting deleted after software upgrade!

    Somehow, my IPhone 4s had a software upgrade, and it DELETED contacts.  Anyone else have a problem with this????  UGH!
    I had a thunderbolt before my IPhone, and my contacts were saved to the verizon back up assistant.  They are now nowhere to be found!

    If you were already using iOS 5 where you using the iCloud feature to back up your device? If so, you should be able to retrieve your contacts. If you just upgraded to iOS 5 where you backing up your device on your computer via iTunes? You were advised to complete a backup prior to proceeding with the software update...if you did so then a copy of your back up should be available in iTunes. Try looking at the following link to see if it helps:
    http://support.apple.com/kb/ht1414
    If you did not do a backup and you were not using iCloud to do backups then you would need re-sync your contacts from another source...did you use a contact manager on your computer (such as Outlook)? If you did then you can retrieve your contacts from there. Try looking at this link to see if it helps. If it is not the correct one you can do a search on that site to find the article that better fits your needs.
    http://support.apple.com/kb/PH1674

  • I want to get a Nikon D3100, but my macbook has OS 10.5.5 on it and I've read that the D3100 needs at least 10.6.5. What will happen if I try to use this camera with my computer? Will iPhoto simply not recognize it or will I get distorted pictures, or..?

    I want to get a Nikon D3100, but my macbook has OS 10.5.5 on it and I've read that the D3100 needs at least 10.6.5. What will happen if I try to use this camera with my computer? Will iPhoto simply not recognize it or will I get distorted pictures, or....what?

    andyBall_uk wrote:
    The manual says
    ❚❚ Supported Operating Systems The supplied software can be used with computers running the following operating systems: •          Windows: <snip>
    •          Macintosh: Mac OS X (version 10.4.11, 10.5.8, 10.6.4)
    Nikon say that you need 10.6.5+ for the latest firmware, although I don't see why.
    Thanks for that! I was looking for that manual, but for some reason, couldn't find it.
    I guess I'll have to contact Nikon and find out what the real story is. The camera was introduced in '08 or '09, so I'm wondering why you'd need software as recent as 10.6.5??
    Still very confusing.  :-?
    Why does it state that the camera is compatible with "10.4.11, 10.5.8..."? Does that mean that anything between 4.11 and 5.8 is incompatible???
    BTW, I tried downloading the 10.5.8 combo update recently and got an error message that the update was "corrupted" after it was all downloaded, so I was not able to install that.

  • Having problems with Bridge shutting down after saving photo in PS Cs5,,,,,,,,,  Also when i attempt to update either PS or bridge get an error message in Adobe application manger "Error loading updater workflow"

    Having problems with Bridge shutting down after saving photo in PS Cs5,,,,,,,,,  Also when i attempt to update either PS or bridge get an error message in Adobe application manger "Error loading updater workflow"

    Sorry for the late reply. My email firewall has become a little over zealous & sent a lot of my emails straight to my junk email folder, so I have only just now discovered your reply in my junk mail folder.
    The only "don't open files exceeding xxx megabytes" instruction I can find in my Prefs, is in the Bridge Prefs for Thumbnails, & mine is set at 1000mb. The biggest files I handle are bigger than 200mb so I should be able to open a few, not just one.
    However, this doesn't explain why I can open a psd format file of 180mb, close it, but then can't open a RAW format file of only 26mb immediately after.
    I can open the RAW file only if I restart my computer - very annoying!
    However, thanks for the advice about the video card & memory.
    So, I'm still stuck as to what the issue is.

  • I am having problems with my music collection, after burning all of my music to the computer I organized it into folders and placed it in the iTunes Folder. Starting on a new computer now. I can get my music from old computer?

    I am having problems with my music collection, after burning all of my music to the computer I organized it into folders and placed it in the iTunes Folder. As of now i realize this was a mistake. Starting on a new computer now. I cant get my music to transfer from the itunes folder on the old computer? I keep getting error "Can't Read from the source file or disk." Whenever I got to folder properties its always checked read only. But when i play the song it works just fine. Im sure this is just because I added music into itunes folder but is there anyway to fix it?

    WMA files are 'window media audio' files, which is a Microsoft format. If you want to add them to your iTunes library on your Mac then you will need to convert them into a compatible format first. If you still have your windows machine then iTunes for Windows can convert them from WMA to MP3 format : https://discussions.apple.com/message/24158701#24158701
    Or try a search for, for example, 'convert wma to mp3' to find programs to convert them.

  • How do i get a new tab to open up with my home page after i click on the + at the end of the tab

    how do i get a new tab to open up with my home page after i click on the + at the end of the tab

    problem solved thak you Andy.c that was too easy and a fast reply i'm abit of an iliterate with these things

  • My i pad is not getting open after  it bang with door no scratch has come because it was in leather cover but its not getting open kindly suggest?

    my ipad is notb getting open after  my baby had bang with the door no scratch has come but it is not switching on can  u please advice.
    i will be thankful if u provide  sufficient information.

    Hi Naveen,
    What you are doing is not supported by Oracle. From EM Database Console FAQ (863631.1):
    What action needs to be taken if the hostname or SID of the database server is changed?
    If there is a hostname or SID change for the database server then the database console needs to be recreated. There is no other solution if the hostname or SID is changed other that recreating the database console. All database console configuration files are created under the hostname_sid directory and the configuration files along with the repository keeps reference of the hostname, which is why dbconsole needs to be reconfigured if there is change in hostname/sid.
    Refer : Note.293678.1 How To Reconfigure DB Control After a Hostname, Domain name or Listener Change Has Occurred On The Server
    And take a look at note 278100.1: How To Drop, Create And Recreate DB Control In A 10g Database
    Eric

  • When i open my computer I get the white screen with apple symbol and there are vertical lines all over the screen with green pixels and after a few minutes the screen gets grey and I get message to restart my computer what happens

    3 years ago I bought an IMac Desktop that I am using for a lot of things but the most important for dvd montage in Imovies and Idvd.
    Now today when I opened my computer I get as usual the white screen with the Apple symbol but there were all over the screen vertical lines with green pixels and after a while the screen gets grey and I get message to restart my computer using the power button or the restart button and when I do so each time the same is happening somebody can tell me what is happening and what caused this. This computer is my work and now I have no income anymore.
    On the Apple support site they are asking to enter the serial number and when I do so I get message it is wrong but it is the only one I have and I buy this computer in Cairo Egypt. I am living in Hurghada in Egypt for the moment. When I call the technical support of the shop where I buy it they are telling me that it is the hard disk or ram and that I probably lost everything on it and they are asking a big amount to repair.
    Can somebody advise me on this matter. Thanks in advance

    You can find the serial number either in About this Mc in the Menu bar under the , or it should be on a sticker under the foot of the machine.
    If you have the install discs, try booting from them, holding down the c key and then using Disk Utility to check the drive. 
    You can also boot into Safe mode
    To start up into Safe Mode (to "Safe Boot"), do this:
       1. Be sure the computer is shut down.
       2. Press the power button.
       3. Immediately after you hear the startup tone, press and hold the Shift key.
          Tip: The Shift key should be held as soon as possible after the startup tone but not before.
       4. Release the Shift key when you see the gray Apple and progress indicator (looks like a spinning gear).
    During the startup in Mac OS X 10.2 through 10.3.9, you will see "Safe Boot" on the Mac OS X startup screen.
    During the startup in Mac OS X 10.4 or later, you will see "Safe Boot" on the login window, which appears even if you normally log in automatically.
    Please post back with results,
    To leave Safe Mode in any version of Mac OS X, restart the computer normally, without holding any keys during startup.

  • Anyone having problem with iphone getting not delivered message after sending picture and it really is getting delivered to recipient.

    Anyone having problem with iphone getting a not delivered message after sending pic and it really is getting delivered to recipient.

    Same problem here with and I've done everything shy of a total reset which I also find unacceptable. This problem exists on all iMessage platforms (iPhone, iPad, and Mac) so I don't see how restoring my iPhone would help the problem.

  • I am unable to get beyond the "sync with iTunes" splash page after connecting my iPhone; every tab is grey. What gives?

    I am unable to get beyond the "sync with iTunes" splash page after connecting my iPhone; every tab is grey. What gives?

    Is the computer the one the device normally syncs with?
    If not, sync with the computer it normally syncs with.
    If it is, place the device in DFU mode (google it) and restore.

  • How to get the table with no. of records after filter in webdynpro

    Dear Gurus,
    How to get the table with no. of records after filter in webdynpro?
    Thanks in advance.
    Sankar

    Hello Sankar,
    Please explain your requirement clearly so that we can help you easily.
    To get the table records from your context node use method get_static_attributes_table()
    data lo_nd_mynode       type ref to if_wd_context_node. 
    data lt_atrributes_table  type wd_this->elements_mynode. 
    lo_nd_mynode = wd_context->get_child_node( name = wd_this->wdctx_mynode ). 
    lo_nd_mynode->get_static_attributes_table( importing table = lt_atrributes_table ). 
    Note: You should have already defined your context node as a Dictionary Structure.
    BR,
    RAM

  • ARD HELP!. After Logging into Server Screen gets distorted.

    Can anyone explain to me the problem I am having. I have a Mac OSX Server 10.3.9. When I log into my server using ARD the screen looks fine but right after it logs in the whole screen gets distorted like a moire pattern and I cannot identify any icons and cannot confidently control the desktop. Does anyone know the reason why or how to fix it?
    HELP!!!

    I figured it out. Thanks anyway!

Maybe you are looking for

  • 11g on VMWare Not Starting Service, ORA-12560 etc.

    It's obvious that my Listener is up and running but that the Oracle Service never got started. I'm using a VMware instance of Win2003 Server with Oracle 11g on it. I'm having very similar issues to the person that wrote this: http://www.dbasupport.co

  • How do I permanently enlarge the text size

    Hi, all. I know how to enlarge the text size by hitting the "command +" keys simultaneously, but then when I close Safari, the text size is back to the default size the next time I open Safari. I'd like the font size to stay large all the time. How c

  • How to record mouse movements?

    Hello, I have the most updated version of Mac OS on my 2014 Macbook Air. Is there a program I can use to record my mouse strokes and clicks? I am doing a repetitive task and would like for the mouse to move on its own and make the same exact movement

  • "This item is temporarily unavailable - Try again later" (Dec 2013)

    A few days ago, I reset my imac (21.5 inch - mid 2010) to factory settings, and now I cannot download from iTunes, music that I've brought. When I first opened iTunes, it was empty (of course), so I tried pressing the "Check for Available Downloads"

  • Importing HDV Material in Final Cut Pro 4.5

    I'm using Final Cut Pro HD (4.5), quite an old version, and I want to import HDV footage, shot with a "SONY HDR-HC7E" camera. Is it possible? Are there any settings to use? In the "easy settings" section, I see there is DVCPRO HD, but I guess it's no