Jump to content

Search the Community

Showing results for tags 'canvas'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • uniGUI Public
    • Announcements
    • General
    • Feature Requests
    • Installation
    • Deployment
    • Other Platforms
  • Licensing
    • Licensing
    • Ordering uniGUI
  • Bug Reports
    • Active Reports
    • Closed Reports
    • Old Bug Reports
  • uniGUI Development
    • General Development
    • uniGUI Releases & Roadmaps
    • Utilities
  • Mobile Platform
    • uniGUI Mobile
    • Mobile Browsers
  • Users Area
    • Sample Projects
    • Components and Code Samples
    • Third Party Components
  • Non-English
    • Non-English
  • Miscellaneous
    • Hosting
    • Server Security
    • Jobs

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 10 results

  1. Using a TUniCanvas (cArea), how can I get the toDataURL data (required for image of canvas later)? UniSession.AddJS('var context = fMain.cArea._cc_; '+ // CONTEXT WORKS FINE 'var dataURL = fMain.cArea.toDataURL(); '+ // FAILS 'var dataURL = fMain.cArea._cc_.toDataURL(); '+ // FAILS 'var dataURL = fMain.cArea.BitmapCanvas.toDataURL(); '+ // FAILS 'var dataURL = context.toDataURL(); '+ // FAILS Please advise how - thanks in advance
  2. I am trying to add JavaScript 3rd Party Crop to a canvas (cArea) object. This usually works in unigui when dealing with an element within a htmlframe but I am struggling with canvas implementation - please advise how ? Thanks SERVERMODULE // https://cdnjs.com/libraries/jquery-jcrop CustomFiles.Add('<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-jcrop/0.9.15/js/jquery.Jcrop.min.js" integrity="sha512-KKpgpD20ujD3yJ5gIJqfesYNuisuxguvTMcIrSnqGQP767QNHjEP+2s1WONIQ7j6zkdzGD4zgBHUwYmro5vMAw==" crossorigin="anonymous"></script>'); CustomCSS.Add('<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-jcrop/0.9.15/css/jquery.Jcrop.min.css" integrity="sha512-bbAsdySYlqC/kxg7Id5vEUVWy3nOfYKzVHCKDFgiT+GsHG/3MD7ywtJnJNSgw++HBc+w4j71MLiaeVm1XY5KDQ==" crossorigin="anonymous" />'); FORM CREATE Script.Clear; s:= '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-jcrop/0.9.15/css/jquery.Jcrop.min.css">'; //Script.Add(s); FAILS cArea ExtEvents s:= 'updatePreview=function updatePreview(c) '+ '{ '+ ' if(parseInt(c.w) > 0) '+ ' { '+ ' ajaxRequest(fMain.cArea, "getCroppedXY", ["cx="+c.x, "cy="+c.y, "cw="+c.w, "ch="+c.h]); '+ ' } '+ '}'; cArea.ClientEvents.ExtEvents.Add(s); s:= 'fetchImage=function fetchImage(c) '+ '{ '+ ' ajaxRequest(fMain.cArea, "getCroppedImg", ["cx="+c.x, "cy="+c.y, "cw="+c.w, "ch="+c.h]); '+ '}'; cArea.ClientEvents.ExtEvents.Add(s); ... FORM CANVAS REQUEST VIA BUTTON EVENT (Jcrop / a.Jcrop FAILS ???) with cArea, JSInterface do begin JSCode('var a = document.getElementById("'+JSName+'_canvas"); a.Jcrop({'+ 'options: {'+ ' allowResize: true, '+ ' allowMove: true, '+ ' enableHandles: true'+ ' }, '+ 'onSelect: a.updatePreview, '+ 'onDblClick: a.fetchImage'+ '});'); end; // with
  3. Looking for advice on how to detect a uni canvas mouse RightClick ?
  4. I am using UniCanvas (cArea) and want to zoom / scale display (experimental code below does nothing), please advise how - Thanks in advance. case ScaleMode of 0: begin cArea.BeginUpdate; cArea.ScaleBy(1, 1); cArea.EndUpdate; end; 1: begin cArea.BeginUpdate; cArea.ScaleBy(10, 10); cArea.EndUpdate; end; end;
  5. I am trying to draw a rectangle polyline over a canvas containing a color image, then (via way of a mouse drag move event) remove that rectangle polyline with it's original points and redraw as a new rectangle polyline using the new x,y co-ordinates. Code below paints with or without "xor", my problem is it will not erase when using the same points, happy for any help - Thanks - Andy UniSession.AddJS('var context=fMain.cArea._cc_; '+ 'var polyln = ['+s+']; '+ 'var shape = polyln.slice(0); '+ '{ '+ ' context.globalAlpha = 1; '+ ' context.globalCompositeOperation = ''xor''; '+ ' context.lineWidth = 1; '+ ' context.strokeStyle = "'+LineColourStr+'"; '+ ' context.moveTo(shape.shift(), shape.shift()); '+ ' while(shape.length) '+ ' { '+ ' context.lineTo(shape.shift(), shape.shift()); '+ ' } '+ ' context.stroke(); '+ ' context.globalCompositeOperation = ''source-over''; '+ ' context.globalAlpha = 1; '+ '}; ' );
  6. Tengo un problema . Tengo un Canvas que sirve para recoger firmas . El canvas esta en autoSubmit:=true Lo guardo con un REF:='001'; nom:='prueba.jpg'; Canvas_firmador.SaveToFile('files\Archivos\'+REF+'\'+nom,tiJPG); pero me sale esto
  7. I have a Mobile TMainmForm TUnimContainerPanel TUnimPanel TUnimHTMLFrame All perfectly displayed on iOS Device. I want to work with the HTMLFrame canvas which is declared in HTML as //HTMLFrame.HTML.Add(' <canvas id = "andy" width = "'+IntToStr(ContainerPanel.Width+43)+'" height = "'+IntToStr(ContainerPanel.Height+84)+'" style = "border: 1px solid #000000;">'); HTMLFrame.HTML.Add(' <canvas id = "andy" width = "'+IntToStr(Panel.Width+43)+'" height = "'+IntToStr(Panel.Height+84)+'" style = "border: 1px solid #000000;">'); //HTMLFrame.HTML.Add(' <canvas id = "andy" width = "100%" height = "100%" style = "border: 1px solid #000000;">'); //HTMLFrame.HTML.Add(' <canvas id = "andy" width = "'+IntToStr(UniApplication.ScreenWidth-2)+'" height = "'+IntToStr(UniApplication.ScreenHeight-2)+'" style = "border: 1px solid #000000;">'); Why can I not get correct width/height for canvas, my best fit was Panel.Width+43 and Panel.Height+84 which is unique to my iPhoneX and incorrect for any other mobile device. How can I get correct pixel dimensions to declare for my canvas ? Please advise - thanks in advance.
  8. I need to implement a signature on my apps, but I have not seen an example someone help me know how. It is similar to Canva.???
  9. Hi I am trying to use the Canvas demo on a Ipad but can't seem to draw. Sure I am doing something wrong. Can anyone point me in the right direction. Russell
  10. Merhabalar; UniGui ile testler almaktayım. HTML5 de bildiğiniz gibi Webcam e erişim sağlanabiliyor. UniGui ile bu işlemi nasıl yapabilirim. PHP Dosyası olarak hazırladım bunu uniHTML frame ile çağırıyorum fakat foto çektirdikten sonra nasıl kaydettireceğimi bulamadım.. PHP Dosyası aşağıdaki gibidir. Query String ile gönderdiğim parametrenin adında kaydetmem gerekiyor.. Teşekkürler. Hi, I'm developing test projects with unigui, as you know it's possible to take picture and save to database via webcam with HTML5. So i was wondering is this possible with UniGUI as well ? If it's possible then how i can do it ? I prepared my project as PHP and calling with uniHTMLFrame but i couldn't find how to save database taken photo after capture via webcam. My PHP file as below, i have to save to database with Query String's parameter which i send to query. Thanks in advance. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB" lang="en-GB"> <head> <meta charset="UTF-8" /> </head> <body> <p><video id="video" autoplay width="200px"/></p> <p><input type="button" id="buttonSnap" value="Take screenshot" disabled="disabled" onclick="snapshot()" /></p> <p> <input type="button" id="buttonStart" value="Start" disabled="disabled" onclick="start()" /> <input type="button" id="buttonStop" value="Stop" disabled="disabled" onclick="stop()" /> </p> <p><canvas id="canvas" /></p> <form name="form1" method="post" action=""> <input type="hidden" name="hiddenField" id="hiddenField"> <?php echo $_GET["GuID"]; ?> </form> <script type="text/javascript">//<![CDATA[ "use strict"; var video = document.getElementById('video'); var canvas = document.getElementById('canvas'); var videoStream = null; function snapshot() { canvas.width = video.videoWidth; canvas.height = video.videoHeight; canvas.getContext('2d').drawImage(video, 0, 0); } function noStream() { log('Access to camera was denied!'); } function stop() { var myButton = document.getElementById('buttonStop'); if (myButton) myButton.disabled = true; myButton = document.getElementById('buttonSnap'); if (myButton) myButton.disabled = true; if (videoStream) { if (videoStream.stop) videoStream.stop(); else if (videoStream.msStop) videoStream.msStop(); videoStream.onended = null; videoStream = null; } if (video) { video.onerror = null; video.pause(); if (video.mozSrcObject) video.mozSrcObject = null; video.src = ""; } myButton = document.getElementById('buttonStart'); if (myButton) myButton.disabled = false; } function gotStream(stream) { var myButton = document.getElementById('buttonStart'); if (myButton) myButton.disabled = true; videoStream = stream; video.onerror = function () { if (video) stop(); }; stream.onended = noStream; if (window.webkitURL) video.src = window.webkitURL.createObjectURL(stream); else if (video.mozSrcObject !== undefined) {//FF18a video.mozSrcObject = stream; video.play(); } else if (navigator.mozGetUserMedia) {//FF16a, 17a video.src = stream; video.play(); } else if (window.URL) video.src = window.URL.createObjectURL(stream); else video.src = stream; myButton = document.getElementById('buttonSnap'); if (myButton) myButton.disabled = false; myButton = document.getElementById('buttonStop'); if (myButton) myButton.disabled = false; } function start() { if ((typeof window === 'undefined') || (typeof navigator === 'undefined')) log('This page needs a Web browser with the objects window.* and navigator.*!'); else if (!(video && canvas)) log('HTML context error!'); else { if (navigator.getUserMedia) navigator.getUserMedia({video:true}, gotStream, noStream); else if (navigator.oGetUserMedia) navigator.oGetUserMedia({video:true}, gotStream, noStream); else if (navigator.mozGetUserMedia) navigator.mozGetUserMedia({video:true}, gotStream, noStream); else if (navigator.webkitGetUserMedia) navigator.webkitGetUserMedia({video:true}, gotStream, noStream); else if (navigator.msGetUserMedia) navigator.msGetUserMedia({video:true, audio:false}, gotStream, noStream); else log('getUserMedia() not available from your Web browser!'); } } start(); //]]></script> </body> </html>
×
×
  • Create New...