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

  • Home
  • SEARCH
  • 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 8133103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:30:35+00:00 2026-06-06T09:30:35+00:00

I have one rectangle. The width of the rectangle is deciding based on the

  • 0

I have one rectangle. The width of the rectangle is deciding based on the start time and end time. if startime is 0 and end time 20000 then it will have some 200 width and 100 height. Here hight is constant .
And the colour of the rectangle is calculating based on start colour and end colour. so If I give only start colour,
then the background of the rectangle’s colour is set to that colour. If I give
start colour and end colour then partially it will draw start colour and rest of
the half part of rectangle will be end colour.

For example

start time 0;
end time 20000;

All the time are in milliseconds.

start colour is red
end colour is green.

o-10000 it will be red and 10001 – 20000 green.

Now if I want to get 100th millisecond whats the colour of that rectangle.
What could be the logic I have to use.I dont want to use any HashMap concept.
Is there any colour time interpolation theory? I am very much interested to
calculate all these things. Please help me. I am zero knowledge in this interpolation theory.

  • 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-06-06T09:30:38+00:00Added an answer on June 6, 2026 at 9:30 am

    What you’re looking for is a gradient. There wouldn’t be any strict rules as to how to display a gradient between red and green. I can imagine you can start from RGB {255, 0, 0} (very red) and then while decreasing the red part, increase the green part {0, 255, 0}. You can now see that there will be 510 (255+255) steps there. 20000 ms / 510 colour values = your step.

    Drawing of a similar gradient rectangle is described here:
    https://stackoverflow.com/a/4424501/211197
    Update it to your needs, add your time step to it, and it should be it, I guess.

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

Sidebar

Related Questions

I have one line (two point (x,y) (x1,y1)) and a rectangle with focus point
I have created a rectangle now I have to put one JLabel into this.
have one time consuming step that flattens a bunch of files. basically i'd like
I have one XML request which I need to modify (to XML) and then
I have one model User and will be creating another one Category . Both
Hi have already function solution but one issue: // The screenshot will be stored
Consider I have a QML rectangle of width 'w' and height 'h', colored all
Here's the situation: We have some generic graphics code that we use for one
I have a UIButton with a specified width of 200. Its autoresizingMask property is
Requirement: To draw one Bitmap Image and rectangle(s) based on the collection of points.

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.