Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7128169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T11:06:38+00:00 2026-05-28T11:06:38+00:00

I need to solve a complex situation, where i already have a Canvas element

  • 0

I need to solve a complex situation, where i already have a Canvas element rendered with some kind of text lines and etc. I don’t know how and which way it was rendered. But now i need to set the transformation of that means rotate , scale it etc.

var canvas = document.getElementById("item1-canvas");
var ctx = canvas.getContext("2d");

var angle1 = 0.1;
var angle2 = 0.14;
var cs = Math.cos(angle1), sn = Math.sin(angle1);
var h = Math.cos(angle2);

var a = 100*cs, b = -100*sn, c = 200;
var d = h*100*sn, e = h*100*cs, f = 200;

ctx.setTransform(a, d, b, e, c, f);

As i set transform or any thing the canvas cleared and needed to be redrawn, but i don’t know the exact mechanism of first drawing. To solve this i came to a thought to render a canvas inside another canvas, so that initial canvas don’t need to be rendered any way. And we can set the transforms of second canvas.

How can i do so?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T11:06:38+00:00Added an answer on May 28, 2026 at 11:06 am

    If you render one (bitmap) canvas to another (using drawImage()) just to introduce transformation you will get poor results. This is because the results of a canvas are not vectors, but pixels.

    You need to trap and record the drawing commands on the first canvas context so that you can replay them later under a transformed context.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Need some help to solve this. I have a gridview and inside the gridview
I have a complex sql need to solve, the idea is to determine the
I don't like JSF but I need to solve this problem with it, I
To solve some problem I need to compute a variant of the pascal's triangle
I have a fairly long and complex HTML document, and I need to find
Here's the situation: I have a website with a complex address form with multiple
I'm trying to do some complex math where I need to call upon some
I have an NSString which has escape characters etc in it. I need to
I need to solve a problem within job booking software and am hoping to
I need to solve a job affectation problem and I would like to find

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.