I've got a number of 'line' objects -- each storing information about a line drawn using Core Graphics. The problem is, that though there may be several line objects each having a unique color and stroke width, all lines are getting drawn under the SAME color and stroke width.
Each line object has attributes such as stroke color, strok...
Hi,
I'm trying to render a UIImage in Objective-C (working on a simple iPhone app (breakout-type thing) to get used to the environment). However, I'm getting an "Error: CGContextDrawImage: invalid context" error when I try and draw it.
My question is: how do I set the context that the DrawAtPoint method of UIImage uses?
Here the rele...
The simple curve in this application only appears when it's dragged off the screen, or the window is resized. When the application just starts up it doesn't appear, and when the window is maximized or minimized it also disappears. However, all of these times, "Path Drawn" is printed, so all of the painting functions are called. Is there ...
I'm looking to add double buffering to a drawing function like this.
dc = wx.PaintDC(self)
gc = wx.GraphicsContext.Create(dc)
#draw GraphicsPaths to the gc
I tried to first draw to a MemoryDC and then blit that back to the PaintDC:
dc = wx.MemoryDC()
dc.SelectObject(wx.NullBitmap)
gc = wx.GraphicsContext.Creat...
import wx
class MainFrame(wx.Frame):
def __init__(self,parent,title):
wx.Frame.__init__(self, parent, title=title, size=(640,480))
self.mainPanel=DoubleBufferTest(self,-1)
self.Show(True)
class DoubleBufferTest(wx.Panel):
def __init__(self,parent=None,id=-1):
wx.Panel.__init__(self,parent,id,st...
I have a UIImageView with an image in it. I have rotated the image prior to display by setting the transform property of the UIImageView to CGAffineTransformMakeRotation(angle) where angle is the angle in radians.
I want to be able to create another UIImage that corresponds to the rotated version that I can see in my view.
I am almost...