Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Prediction is very difficult, especially of the future. -- Niels Bohr


devel / comp.lang.javascript / Re: Copy canvas content to other canvas.

SubjectAuthor
* Copy canvas content to other canvas.Jonas Thörnvall
`- Re: Copy canvas content to other canvas.Jonas Thörnvall

1
Copy canvas content to other canvas.

<ac9ea510-0296-453d-a4e3-2ca4554b954fn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17494&group=comp.lang.javascript#17494

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:ac8:5916:: with SMTP id 22mr33589244qty.232.1638717352715;
Sun, 05 Dec 2021 07:15:52 -0800 (PST)
X-Received: by 2002:a9d:6ac7:: with SMTP id m7mr25637069otq.306.1638717352478;
Sun, 05 Dec 2021 07:15:52 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.ams4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Sun, 5 Dec 2021 07:15:52 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ac9ea510-0296-453d-a4e3-2ca4554b954fn@googlegroups.com>
Subject: Copy canvas content to other canvas.
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Sun, 05 Dec 2021 15:15:52 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2304
 by: Jonas Thörnvall - Sun, 5 Dec 2021 15:15 UTC

Someone wrote in answer to similar quesion
*******************************************************
Actually you don't have to create an image at all. drawImage() will accept a Canvas as well as an Image object.

//grab the context from your destination canvas
var destCtx = destinationCanvas.getContext('2d');"

//call its drawImage() function passing it the source canvas directly
destCtx.drawImage(sourceCanvas, 0, 0);
Way faster than using an ImageData object or Image element.
*********************************************************

So I tried to copy ctT canvas by just using drawimage but get errors,
MultiID.destCtx.drawImage(ctT, 0, 0);
I tried it with an image so destCtx do work.

But with canvas...
DrawLEFTCANVAS.js:52 Uncaught TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(CSSImageValue or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or OffscreenCanvas or SVGImageElement or VideoFrame)'.
at listLeftCanvas (DrawLEFTCANVAS.js:52)
at buildPlayTrack (mixDown.js:54)
at songDataUpdate (loadsave.js:114)
at autoLoadFile (loadsave.js:36)
at MAINinit.js:77

Re: Copy canvas content to other canvas.

<0c411c9f-2974-4e05-9f62-7283cb275fe1n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17495&group=comp.lang.javascript#17495

  copy link   Newsgroups: comp.lang.javascript
X-Received: by 2002:a05:620a:8d4:: with SMTP id z20mr27517041qkz.526.1638718559558;
Sun, 05 Dec 2021 07:35:59 -0800 (PST)
X-Received: by 2002:a9d:7a45:: with SMTP id z5mr25780998otm.209.1638718559311;
Sun, 05 Dec 2021 07:35:59 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.javascript
Date: Sun, 5 Dec 2021 07:35:59 -0800 (PST)
In-Reply-To: <ac9ea510-0296-453d-a4e3-2ca4554b954fn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.217.164.86; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host: 84.217.164.86
References: <ac9ea510-0296-453d-a4e3-2ca4554b954fn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0c411c9f-2974-4e05-9f62-7283cb275fe1n@googlegroups.com>
Subject: Re: Copy canvas content to other canvas.
From: jonas.thornvall@gmail.com (Jonas Thörnvall)
Injection-Date: Sun, 05 Dec 2021 15:35:59 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 28
 by: Jonas Thörnvall - Sun, 5 Dec 2021 15:35 UTC

söndag 5 december 2021 kl. 16:15:56 UTC+1 skrev Jonas Thörnvall:
> Someone wrote in answer to similar quesion
> *******************************************************
> Actually you don't have to create an image at all. drawImage() will accept a Canvas as well as an Image object.
>
> //grab the context from your destination canvas
> var destCtx = destinationCanvas.getContext('2d');"
>
> //call its drawImage() function passing it the source canvas directly
> destCtx.drawImage(sourceCanvas, 0, 0);
> Way faster than using an ImageData object or Image element.
> *********************************************************
>
> So I tried to copy ctT canvas by just using drawimage but get errors,
> MultiID.destCtx.drawImage(ctT, 0, 0);
> I tried it with an image so destCtx do work.
>
> But with canvas...
> DrawLEFTCANVAS.js:52 Uncaught TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(CSSImageValue or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or OffscreenCanvas or SVGImageElement or VideoFrame)'.
> at listLeftCanvas (DrawLEFTCANVAS.js:52)
> at buildPlayTrack (mixDown.js:54)
> at songDataUpdate (loadsave.js:114)
> at autoLoadFile (loadsave.js:36)
> at MAINinit.js:77
Ok saw the error, solved.


devel / comp.lang.javascript / Re: Copy canvas content to other canvas.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor