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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:58:12+00:00 2026-06-12T00:58:12+00:00

I have a gradient rectangle, drawn with SWT graphical context. How can I retrieve

  • 0

I have a gradient rectangle, drawn with SWT graphical context.
How can I retrieve a color, which is used at a distinct point inside of the rectangle?

e.gc.setForeground(color_highlight_shadow);
e.gc.setBackground(color_normal_shadow);
e.gc.fillGradientRectangle(0, 1, 100, 100, false);
  • 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-12T00:58:14+00:00Added an answer on June 12, 2026 at 12:58 am

    You can get it by copying the area (your pixel) into an image and extracting the RGB from this image:

    final Image image = new Image(display, 1, 1);
    e.gc.copyArea(image, x, y);
    
    ImageData data = image.getImageData();
    
    int pixelValue = imageData.getPixel(0,0);
    
    PaletteData palette = data.palette; 
    RGB rgb = palette.getRGB(pixelValue); 
    System.out.println("RGB value for (x,y): " + rgb);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a function for drawing gradient text which works great on mac, but
I have drawn a circle and applied radial gradient. fine. But when i changed
I have nav buttons on this site: http://www.dermatologypartners.com which have rounded corners, a gradient,
I have used html and body attributes to have a gradient background and a
OpenGL can colour a rectangle with a gradient of colours from 1 side to
i have the following shape <shape xmlns:android=http://schemas.android.com/apk/res/android android:shape=rectangle> <gradient android:angle=360 android:endColor=@color/LightBlue android:startColor=@color/DarkBlue/> <corners android:topRightRadius=10dp
I want to have a Rectangle filled with a checkerboard, which is overlayed by
all As you can see in images i have gradient background (this is responsive
How can I draw a rectangle with a gradient effect like the one pictured
I want to have a rectangle which has three different colors in flex. I

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.