Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DraggableText issue #66

Open
eyganeshv opened this issue Oct 18, 2016 · 3 comments
Open

DraggableText issue #66

eyganeshv opened this issue Oct 18, 2016 · 3 comments

Comments

@eyganeshv
Copy link

eyganeshv commented Oct 18, 2016

ACEDrawingView Version : 2.0.1

added some draggable texts into drawingview. But it would not appear in preview. Please see attach file.

simulator screen shot 18-oct-2016 6 09 40 pm
simulator screen shot 18-oct-2016 6 10 17 pm

Please could you do fix it.

@cainunable
Copy link

I ran into the same problem on a branch that I was playing around with. I managed to fix it in my local translation (which is now written in C#) but someone working on this could do a similar fix in Objective C.

In AceDrawingView.drawings(), after the looping over the pathArray and calling [tool draw] on each, I did something like this:

foreach (UIView childView in Subviews)
{
	if (childView is AceDrawingLabelView)
	{
		AceDrawingLabelView labelView = childView as AceDrawingLabelView;
		CGContext context = UIGraphics.GetCurrentContext();
		context.TranslateCTM(labelView.Frame.Location.X, labelView.Frame.Location.Y);
				context.RotateCTM((System.nfloat)AceDrawingLabelView.CGAffineTransformGetAngle(labelView.Transform));
		labelView.Layer.RenderInContext(context);
		context.TranslateCTM(-labelView.Frame.Location.X, -labelView.Frame.Location.Y);

	}
}

@cor0na
Copy link

cor0na commented Apr 10, 2017

Please translate the above @cainunable 's C# to Objective-C code...

@rlustemberg
Copy link
Contributor

Actually issue 76 included a PR for a fix for that, simpler than looping over the subviews. The problem is that @acerbetti forgot to modify the - (UIImage *)applyDrawToImage:(UIImage *)baseImage method. I'll provide a PR for that

acerbetti added a commit that referenced this issue Dec 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants