Share your advanced knowledge/code with the community.
User avatar
Peter
 
Posts: 727
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080

Painterro-Demo

by Peter Fri Sep 27, 2019 6:57 am

Painterro on GitHub wrote:Painterro is JavaScript painting widget (paint library) which allows editing images in a browser.
It can be easily integrated into your website or blog by including only one JS file and calling initialization code.


Proof of Concept - Code:
Code: Select all
EnableExplicit

#Window = 0
#Container = 0

Procedure PainterroReady()
 
  OpenWindow(#Window, #PB_Ignore, #PB_Ignore, 800, 600, "Painterro-Demo", #PB_Window_ScreenCentered)
 
  ContainerGadget(#Container, 0, 0, WindowWidth(#Window), WindowHeight(#Window))
 
  Protected GadgetID = GadgetID(#Container)
 
  ! Painterro( { id: $(v_gadgetid.div.innerHTML)[0].id } ).show();
 
EndProcedure

LoadScript("https://cdn.jsdelivr.net/npm/painterro@1.0.6/build/painterro.min.js", @PainterroReady())


Image


Dokumentation: https://github.com/ivictbor/painterro

Have fun ... Peter
Fred
Site Admin
 
Posts: 1298
Joined: Mon Feb 24, 2014 10:51 am

Re: Painterro-Demo

by Fred Tue Nov 05, 2019 12:35 pm

Very cool to see integrated in a SB window :)
Return to Tricks 'n' Tips

Who is online

Users browsing this forum: No registered users and 1 guest