public class MyUIView extends UIView{
public MyUIView(CGRect rect){
super(rect);
}
@Override
public void draw(CGRect rect){
super.draw(rect);
CGContext mCGContext = UIGraphics.getCurrentContext();
mCGContext.setStrokeColor(UIColor.black().getCGColor());
mCGContext.addArc(100.0, 20.0,15.0, 0.0, 2 * 3.14, 1);
}
}
However, it has error that mCGContext is null. I didn't have experience in iOS development. I follow how to draw in a UIView using objC here https://mikebluestein.wordpress.com/2010/02/21/drawing-with-coregraphics-in-monotouch-2/, but it seems it is not equivalent to robovm.
By the way, I refer to the TilingView.java in PhotoScroller of robovm sample. It also use UIGraphics.getCurrentContext(), but I can't figure out why its currentcontext has value.
By the way, I refer to the TilingView.java in PhotoScroller of robovm sample. It also use UIGraphics.getCurrentContext(), but I can't figure out why its currentcontext has value.
--
You received this message because you are subscribed to the Google Groups "RoboVM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robovm+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.