Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 14    Views: 88

Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
07/08/14 12:46 PM (9 years ago)

RD Simple Draw is now in the market

Draw with multiple colors on images you include in your app or push one from a URL. Save your artwork to your camera roll and share it with others, or erase it completely. You can change the image from the control panel. * Cheesy demo here: https://www.youtube.com/watch?feature=player_embedded&v=iiqK5sYv6kk * Direct link: https://www.buzztouch.com/plugins/plugin.php?pid=D145DE688E602931F6CBA27 Thank you.
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
07/08/14 01:09 PM (9 years ago)
What a wonderful thing :) Thanks for adding it, it looks great! So no need for duplicating the plugin to add multiple background images correct? Unlike the other iOS plugins that exist correct? Just want to confirm :)
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
07/08/14 01:14 PM (9 years ago)
You can include multiple images in your app and change them with the Control Panel.
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
07/08/14 01:26 PM (9 years ago)
Thanks..
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
07/08/14 01:56 PM (9 years ago)
Sweet Red Dog! I'm gonna grab this and use it in one of my app updates. I had to use a semi-broken one that didn't quite work right and the plugin author couldn't figure out why before. I got it working "good enough", but wasn't exactly what I was looking for. This one looks perfect! Great job.
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
07/08/14 03:33 PM (9 years ago)
There are some predefined json entries causing Json Array errors. I sent you a private message Red.
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
07/08/14 04:12 PM (9 years ago)
Also, when you draw the first line the line width works ok after changing it in xcode. But the next line sizes revert back to the original size of 5.0 or smaller.. I've changed it to 10 originally.. I've tried to find in the code to set the default color but I can't seem to get it working Thanks
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/08/14 05:03 PM (9 years ago)
My name is Smug Wimp, and I approve this transaction. Nice work! Cheers! -- Smug
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
07/08/14 05:13 PM (9 years ago)
have you tested it smug? Maybe its just me, but I have entries in the json that I didn't add :/
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/08/14 06:15 PM (9 years ago)
Tested it? I just got it! :) Nope; not yet. But the concept is valid; I see lots of use for this. Remember the old saying: Hardware will eventually break. Software will eventually work. Cheers! -- Smug
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
07/08/14 06:27 PM (9 years ago)
Line width problem resolved. I just updated the plugin to fix it. For current users, open RD_drawView.m and remark out lines 67 through 78, and line 96. /* if (distance > 10) { distance = 10.0; } distance = distance / 10; distance = distance * 3; if (4.0 - distance > self.lineWidth) { lineWidth = lineWidth + 0.3; } else { lineWidth = lineWidth - 0.3; } */ CGContextSetLineWidth(context, self.lineWidth); CGContextStrokePath(context); self.drawImageView.image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); } - (CGPoint)calculateMidPointForPoint:(CGPoint)p1 andPoint:(CGPoint)p2 { return CGPointMake((p1.x+p2.x)/2, (p1.y+p2.y)/2); } - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint currentPoint = [touch locationInView:self]; // [self setLineWidth:1.0];
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
07/08/14 07:51 PM (9 years ago)
OK guys. Why is my plugin NOT getting the "Top Navigation Bar / Bar Title" when it is compiled? I think I've been staring at code too long. Thanks for your help.
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
07/09/14 07:49 AM (9 years ago)
Very cool, lots of fun uses for this. It reminds me of the Alphabet Tracer app that kept my little guy busy a while ago. Have seen lots of great Piant/Draw source code out there but like the simplicity of this. I would think some code could be added here to allow the user to select the line width just like the color. Will take a look at the source code, thanks for the giuthub link. He has a couple of other interesting repositories to look at.
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
07/09/14 12:02 PM (9 years ago)
Red, I believe it doesn't work properly because you didn't import any of the BT files in the RD_simpleDraw.m file. #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> #import "JSON.h" #import "BT_application.h" #import "BT_strings.h" #import "BT_viewUtilities.h" #import "BT_appDelegate.h" #import "BT_item.h" #import "BT_debugger.h" Thus, the json and normal functions don't interact with the plugin.
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
07/09/14 01:05 PM (9 years ago)
Thanks, but I added them last night and it did not make any difference. I did not have them in my code that worked in my demo vid either. :-(
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.