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 6105839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:00:54+00:00 2026-05-23T14:00:54+00:00

I have an input string like this: { (3200, 1080), (1280, 0) ; (1280,

  • 0

I have an input string like this:

{ (3200, 1080), (1280, 0) ; (1280, 1024), (0, 0) }

which is basically an input I get from my c# program which takes the coordinates of my screens.

The numbers in brackets are coordinates of the lower right and upper left point and define a rectangle. For example:

(1280, 1024), (0, 0) 

means that the first screen has dimensions 1280 x 1024 and starts in the upper left point (0,0). Next to it is the second screen which upper left point is at coordinate (1280, 0) and its lower right coordinate is at point (3200, 1080) – and they form a rectangle.

What I have to do is draw these screen in an web application – nothing fancy just two different colored rectangles would do. Now, I did a little research and saw that html5 canvas might be the way to go, but I want to hear what you think and maybe give me a push in the right direction. If you could give some jsfiddle example that would be appreciated!

  • 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-23T14:00:54+00:00Added an answer on May 23, 2026 at 2:00 pm

    You could just use DIVs with position: absolute, as detailed on this jsFiddle (jQuery used for the sake of simplicity, but the same can easily be accomplished without jQuery).

    edit (I just added the code if for some reason your jsfiddle gets deleted!):

    HTML:

    <div id="screens">
        <div id="screen0" class="screen"></div>
        <div id="screen1" class="screen"></div>
    </div>
    

    CSS:

    #screens { position: relative }
    .screen {position: absolute }
    
    #screen0 { background: blue; }
    #screen1 { background: green; }
    

    JS:

    var originalScreens = [
        {
            position: [0,0],
            dimensions: [1280,1024]
        },
        {
            position: [1280,0],
            dimensions: [1090,1080]
        }
    ];
    var scale = 0.1;
    for(var i=0; i<originalScreens.length; i++) {
        $('#screen' + i).css('left', (originalScreens[i].position[0] * scale) + 'px');
        $('#screen' + i).css('top', (originalScreens[i].position[1] * scale) + 'px');
    
        $('#screen' + i).css('width', (originalScreens[i].dimensions[0] * scale) + 'px');
        $('#screen' + i).css('height', (originalScreens[i].dimensions[1] * scale) + 'px');
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If i have a string like this: $myString = input/name/something; How can i get
This is driving me nuts... I have an input string like so: String input
I have a input string like: $str = ':this is a applepie :) ';
If I have this input string: {post:[matt]} and I want to get the string
I have a string like this: {\lat\:37.790388261934424,\lng\:-122.46047996826172},{\lat\:37.789608231530124,\lng\:-122.46344112701416} And when I tried to get rid
I have an input string like this: \pard\nowidctlpar\qj\b0\scaps This Agreement\scaps0 is made and entered
I have test input string (key=value&key=value...) and key (like this D2335A9CA4924D9F914D2B47B450D436) I need to
I have a string like this: String string ='{{INPUT FILE, NUMBER OF RECORDS},{Item File,
I have an input string which is a directory address: Example: ProgramFiles/Micro/Telephone And I
I have a string input = "maybe (this is | that was) some ((nice

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.