inherit
192066
0
Apr 1, 2013 19:05:15 GMT -8
xyzrpg
3
March 2013
xyzrpg
|
Post by xyzrpg on Apr 1, 2013 17:11:50 GMT -8
I request, or at least inquire about the possibility of, a plugin that integrates drawing software into post writing.
For example, clicking an 'add drawing' button, similar to the 'add poll' or 'add attachment' buttons-- then opening a popup with simple drawing tools and a color selector. Not necessarily something fancy.
A possible feature would be the ability to specify what boards the tool is available in.
Is this a possibility? Is there any interest in such a thing? I have no experience scripting and do not have the time right now-- but it would be useful to me, and potentially others.
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Apr 1, 2013 17:15:58 GMT -8
wouldnt making a drawing in Paint and then attaching it to the post not be the same thing?
|
|
inherit
192066
0
Apr 1, 2013 19:05:15 GMT -8
xyzrpg
3
March 2013
xyzrpg
|
Post by xyzrpg on Apr 1, 2013 17:23:36 GMT -8
It would be the same thing, just with an added step. I do not deny this.
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Apr 1, 2013 18:52:37 GMT -8
ok. just making sure you dont get your hopes too high on this one. the magnitude of a project like this is outstanding.. and if someone does attempt to make something like this (ignoring the fact that you can attach a paint file to a post), it likely wont be something they do for free. just let that stew for a bit.
|
|
inherit
192066
0
Apr 1, 2013 19:05:15 GMT -8
xyzrpg
3
March 2013
xyzrpg
|
Post by xyzrpg on Apr 1, 2013 19:05:14 GMT -8
My hopes would normally be tarnished, but I enjoy stew.
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Apr 1, 2013 19:07:08 GMT -8
who doesnt?
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,322
January 2004
todge
|
Post by Todge on Apr 2, 2013 11:26:28 GMT -8
So long as it's chicken or vegetable, I do..
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on May 7, 2013 10:17:34 GMT -8
I know this request is nearly a month old, but I was browsing the board to see if there were any good ideas, and this was one of them. So, I created a quick prototype just to see how well it would work. Screen shots show you my results so far. A long way from being completed, as I have to add some drawing tools, colours etc.
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on May 7, 2013 11:46:39 GMT -8
Well Peter outshines us all...
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on May 7, 2013 14:37:41 GMT -8
Well Peter outshines us all... It's actually pretty simple, here's the code so you can see how easy it is (note: it doesn't add to the message automatically yet, I tested the base64 string manually in a post)... // Live Drawing prototype // Not finished, or optimised. // http://flashcanvas.net << May look at it so we we can support IE
$(function(){ (function(){ return { canvas: null, context: null, data_image: new Image(), data: "", mouse: { x: -1, y: -1 }, started: false, images: {}, init: function(){ this.setup(); if(yootil.location.check.posting()){ this.create_canvas(); this.add_drawing_button(); } if(yootil.location.check.thread()){ this.convert_canvas_data(); } }, setup: function(){ var plugin = proboards.plugin.get("pixeldepth_live_drawing"); var settings = (plugin && plugin.settings)? plugin.settings : false; if(settings){ this.images = plugin.images; } }, create_canvas: function(){ this.canvas = $("<canvas height='235' width='520px' style='border: 1px solid #000' id='pd_canvas'></canvas>"); this.context = this.canvas.get(0).getContext("2d"); this.context.save(); }, add_drawing_button: function(){ var self = this; $(".controls").find(".bbcode-editor, .visual-editor").ready(function(){ var img = $("<img />").attr({ src: self.images.live_drawing, title: "Draw A Picture" }).click($.proxy(self.show_drawing_window, self)); $(".controls").find(".bbcode-editor, .visual-editor").find(".group:last ul:last").append($("<li>").addClass("button").append(img)); }); }, show_drawing_window: function(){ var self = this; var draw_wrapper = $("<div title='Draw A Picture' style='text-align: center'></div>").append($(this.canvas)); $(draw_wrapper).dialog({ modal: true, height: 350, width: 600, resizable: false, draggable: false, dialogClass: "live_drawing_dialog", open: $.proxy(this.init_canvas, this), buttons: { Cancel: function(){ self.context.setTransform(1, 0, 0, 1, 0, 0); self.context.clearRect(0, 0, self.canvas.get(0).width, self.canvas.get(0).height); self.context.restore(); $(this).dialog("close"); }, "Add To Post": function(){ console.log(self.canvas.get(0).toDataURL()); $(this).dialog("close"); } } }).attr("title", "Draw A Picture"); }, init_canvas: function(){ var self = this; this.canvas.mousedown(function(e){ self.context.beginPath(); self.context.moveTo(self.mouse.x, self.mouse.y); self.started = true; }); this.canvas.mouseup(function(e){ self.started = false; }); this.canvas.mousemove(function(e){ self.mouse.x = (e.pageX - self.canvas.offset().left); self.mouse.y = (e.pageY - self.canvas.offset().top); if(self.started){ self.context.lineTo(self.mouse.x, self.mouse.y); self.context.stroke(); } }); }, convert_canvas_data: function(){ var datas = $("td.content div.message div[title*=data\\:image]"); datas.each(function(){ var data = this.title.split(";base64,")[1]; // Reg. found on StackOverflow to check for a base64 encoded string if(data.match(/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/)){ var img = document.createElement("img"); img.src = this.title; this.title = ""; this.appendChild(img); } }); } }; })().init(); });
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on May 10, 2013 2:47:22 GMT -8
|
|