What I'm trying to accomplish is to save a line drawing to a sprite to later reuse the drawing.
In another thread I have seen the solution to this problem, but unfortunately I have some issues because the saved drawing is somehow cut off at some points. It seems like there is a problem with the dimensions. So far I have done following:
`public ModelNode(CCDrawNode line) : base()
CCSize cSize = line.ContentSize;
rtm = new CCRenderTexture(cSize, cSize, CCSurfaceFormat.Color, CCDepthFormat.Depth24Stencil8);
rtm.BeginWithClear(CCColor4B.Transparent); line.Visit(); rtm.End(); rtm.Texture.IsAntialiased = true; modelSprite = new CCSprite(rtm.Texture); modelSprite.AnchorPoint = CCPoint.AnchorMiddle; this.AddChild(modelSprite); }`
`mNode = new ModelNode(line);
mNode.Position = this.VisibleBoundsWorldspace.Center;
Here's a screenshot showing both the drawn line and the as a sprite saved, cut off node.
Someone an idea what is going wrong?