Gradient - top to bottom

Hello

I came across this piece of code that can fill a field with a gradient background.  However, funds in gradient from left to right; I want to fill from top down.

Even if a previous user has asked this question before and found a solution, the solution was not displayed (so I searched this forum for the right solution, but does not).

Anyone have any ideas?

int[] xInds = new int[]{0, getExtent().width, getExtent().width, 0};
int[] yInds = new int[]{0, 0, getExtent().height, getExtent().height};

final int[] cols = new int[]{deep_blue, light_blue, light_blue, deep_blue};

graphics.drawShadedFilledPath(xInds, yInds, null, cols, null);

Worked!  Thanks for your help!

int[] xInds = new int[]{0, 0,getExtent().width, getExtent().width};
int[] yInds = new int[]{0, getExtent().height, getExtent().height,0};

final int[] cols = new int[]{Color.DEEPSKYBLUE, Color.LIGHTBLUE, Color.LIGHTBLUE, Color.DEEPSKYBLUE};

g.drawShadedFilledPath(xInds, yInds, null, cols, null);

Tags: BlackBerry Developers

Similar Questions

  • Why my Firefox (old and new for these days!) has NO toolbars, top or bottom - he'll just in my home page and there is no way - I had to use Windows Explorer to send you this!

    When I open Firefox, it works to my page and host than EILLS screen - no. BARS at the top or bottom of the screen. I can't get anywhere! I have to Ctrl-alt-del out! If my e-mail, I click on something that connects to the Internet, the same thing happens - Firefox is at fault, not my home page.

    The first thing to try is to make sure that you are not using the full screen. Press F11.

  • Since then went black download firefox 4 top and bottom of my screen and I can barely see the button/arrow to the left

    Question
    Since then went black download firefox 4 top and bottom of my screen and I can barely see the back/arrow button, if I can not go back to 3.6 and you'd have to show me how, step by step without computer talk if it is not possible for you that I return to internet explore... cordially chris williams

    You are welcome. I'm glad that you were able to find a solution with the information provided by the contributors here.

    So that other users can find solutions to Firefox previously asked take charge of issues, please take a few minutes to come back on the forum, log in, then click 'resolved' next to the answer above you helped more to find a solution. Thank you.

  • CN460A: ADF print copy with a thin line from top to bottom?

    ADF print copy with a thin line from top to bottom of page.  fine prints from the PC to the printer...

    This was probably caused by a specification on the thin glass used for scanning form the ADF.  See here for more information on cleaning this area to solve printing line when using the ADF.

  • Defining the different top and bottom margins in each section of 5 Pages

    I was able to define different left/right margins in the various sections of a document of 5 Pages, but when I put a new top or bottom margin, it changes all the sections in the whole of the document. Can anyone describe how to get up and down different margins on each page? I created a new section for each page.

    Click the new post > Toolbar > Document > Section > uncheck continue from the previous section

    Peter

  • Satellite P845-Canada-10J - HDMI to TV - horizontal lines from top to bottom

    During video playback through HDMI to my TV, I get horizontal lines from top to bottom.

    I tried to change the refresh rate, change the cables, evolution of videos of different ports and video and all players the same. I have a Hannspree 32 inch 1080 p which supports 50 Hz and 60 Hz.

    Any ideas on how to fix this?

    and are not the same visible lines on another screen or internal monitor?
    Laptop Satellite P845-Canada-10J seems to also support the RGB (VGA) port you could try connecting the monitor to this port just to check if the same lines are visible using another video interface

  • Photosmart 6510: lines horizontal and top and bottom of page when scanning

    Hello

    Scans of the bucket of my Photosmart HP 6510 leave a horizontal line at the top and bottom of the page.

    I tried to adjust every page that I scan to align as straight as possible on the glass and this sometimes helps a bit.

    I am able to bypass the lines in culture to, but would prefer to find a real solution.

    Any help would be appreciated because I don't know a lot about the scanners, thanks!

    I've included a sample page below (the mark on the right side is not dirty glass, it has been a staple in the page):

    Welcome to the HP community @lgilb01,

    I wanted to tender hand to respond to your message on the lines that you notice when you scan to scan in your Photosmart 6510 bed. It seems to me that there could be some light enter when performing the analysis, causing lines. If you are only scanning one page at a time, the lines should not appear as they are now.

    Here is a troubleshooting guide for you to try. If the lines do not fade, contact HP directly to see about a replacement printer.

    HP Photosmart 5510, 6510 and 7510 e - all-in - One Printer Series - vertical stripes, lines or scratches in Copies or scans

    Tip: Make sure that the printer is plugged directly into the wall, avoiding bars power and surge protectors. This ensures that the printer is full on.

    Testify of my answer by pressing the thumb in the air below and hit the "accept as Solution" button, if I have you helped a resolution!

    I hope I helped!

    Contact HP:

    Step 1. Open the link: www.hp.com/contacthp/
    Step 2. Enter the product number or select Auto detection
    Step 3. Scroll up to "still need help? Fill out the form to select your contact options.
    Step 4. Scroll down and click on: contact HP options - click Get phone number
    File number and phone number are displayed.

  • OfficeJet Pro 8500 has vertical line from top to bottom after a copy or scanning via adf

    Each copy or scan do using the automatic document feeder to my HP Officejet Pro 8500 a shows a vertical line from top to bottom left of each page. I have cleaned the printer at all parts of the feeder, - nothing dirty in fact found. When I copy or scan the glass plate there is no vertical line on paper.

    Anyone have the same experience with this printer?

    Usually if the scanner works on the dish, but product line in the scans from the ADF, it's because of something on the glass.  Have you tried to shine a flashlight down on the surface of the small approximately 1 in. piece of glass on the left side of the bucket?  This is the strip of glass used for the ADF.

    Like trying to clean the white strip, located on the lid above the glass of the ADF, well clean to make sure there is no debris on the support that can cause this line appears.

    * Make sure that the printer is plugged into a direct socket, rather than a surge protector.  The 8500 has protection against overvoltages integrated in the device and an another surge in the circuit protector can sometimes cause lines.  However, usually this causes lines in both ADF and flatbed scans.

    There is also a document provided by HP with the steps to troubleshoot issues when a line is present in the copies/scans.  The document can be accessed here.

    I hope this helps.

  • Portrait mode, how to drag a program window to the top and bottom of a window and have it snap.

    Maybe it's more of a feature request: Windows 7 has a component feature snap where you drag a window of program on the side of the screen and it will maximize this measure only half of the screen.  I love this feature and use it often to keep my office in order.  I recently turned to another monitor that I keep in Portrait mode, but the nod to works only on the sides.  Good if I had a big enough screen, but I really want to align with the top and bottom of the screen.  Please advise, thank you.

    Interesting idea! To get to the right people at Microsoft, please click thegive us your comments. Help improve Windows 7 link under ads at the top of the main page of the forum, or go to the page give us your comments for Windows 7 . Boulder computer Maven
    Most Microsoft Valuable Professional

  • Remove the big black bar at the top and bottom of Office

    original title: my desktop image now has a big black bar at the top and bottom. How can I get rid of this?

    The image filled my monitor yesterday. Today, I have a big black bar at the top and bottom. How can I get rid of this?

    1. Right-click on your desktop, choose Customize.
    2. At the bottom, click background.
    3. Finally, click on the Position of the image and choose Stretch or complete, what you prefer.
    4. Click on save changes.
    If this isn't the cause, you could also do that you use the full resolution of your monitor.
    1. Right-click on your desktop, choose the resolution of the screen.
    2. Make sure that you use the recommended resolution.
  • Is it possible that I can have my background scroll from top to bottom of the image

    Original title: scrolling background

    One of my friends has recently done a photo for me I would really like to have as my background, but it is very vertical. Is it possible that I can have my background scroll from top to bottom of the picture and then go back to the top?

    Backgrounds can not move, don't.

  • How to crop without black at the top and bottom

    Hello

    I try to crop a video. I go to Effects > video effects > transform > crop and under the effects of the controls, I put 20.0% on top and 12% on the bottom because that's how I want the cropped video. When I export the video it is always black on the top and bottom. How crop and export this video without that there is black at the top and bottom (and also to reduce the height of the video, take a part from the top and down)? Thank you!

  • How is - what cut you a rectangle in 2 colors with a diagonal from top to bottom?  Once I draw a diagonal with the online tool I am at loss to create 2 color split?

    How is - what cut you a rectangle in 2 colors with a diagonal from top to bottom?  Once I draw a diagonal with the online tool I am at loss to create 2 color split?

    Rosemary,

    A simple way would be to:

    (1) give the rectangle a color, then Ctrl > Cmd + C + F;

    (2) use the direct Selection tool, and then deselect (click and empty space), then click on the opposite corner to the part where you want to keep the color, then press DELETE, then change the fill color to the other.

    Or, you can ClickDrag with the line tool along the diagonal line from corner to corner (guides are your friends), select it all and Pathfinder > divide, then select live from the triangle where you want to change the color and change.

  • I try Ben numbers several pdfs at the same time.  Once I did this, I'll and look and from the second page, the Ben numbers appear at the top and bottom.  I want only the bates numbers to appear at the bottom.  How can this be a gift

    I try Ben numbers several PDFs at the same time.  Once I have a result, from the second page, the Ben numbers appear at the top and bottom.  I want only the bates numbers to appear at the bottom.  How is that possible?

    Hey Bethany,.

    Please try again to implement numbering following the steps in article Acrobat bates help | Add headers and footers Bates numbering in PDF format

    Make sure that you apply for Bates numbering in the foot of page, as shown in the screenshot below.

    Kind regards

    Nicos

  • Using the PNG format with maximum width without clipping the top and bottom of the image?

    I use PNG format to preserve transparency and shadow, I am trying to integrate to give the illusion that this slab object is floating above the other layers.  First I tried file > place to position the menu object on edge of header/beginning of the content.  This leaves no option to force the image to span the width of any screen.  I need that I tried to use object > fill > and then clicking on the maximum width of the rectangle (which solves the problem of maximum width), but now I am facing a problem of cutting top and bottom of the image.  The next thing I can think of is to go back to Photoshop and to distort the image, so it is not as big.  In my view, there must be an easier way to achieve will not also give my image an abnormal appearance.  Thoughts?  Thanks in advance.

    Thanks, that's useful.  I also found that I've cropped for a large part of the canvas.  After the increase the surface of the canvas AND fill everything is fine now.  I think that your suggestion may help with the problem of affect scroll I will have when you use different resolutions. I will try to set the size in a single dimension (height) so that different resolution screens see the same scrolling actions.  Mylenium thanks!

Maybe you are looking for

  • have problems with hardware acceleration of rendering: fonts looks terrible

    have problems with hardware acceleration of rendering (integrated gpu: amd 760 g) of one of the latest nightly updates - police seem terrible http://i.imgur.com/kWnySVv.png

  • Qosmio X 500-driver stopped responding and has successfully recovered

    Display driver stopped responding and has successfully recovered! Is it someone who has this problem on the Qosmio X 500 with NVIDIA GeForce GTS 360 M graphics card?This error has become usual, for me it is 5 to 10 times a day. It happens more often

  • Ajax submit failed: Error = 403 Forbidden

    Hello I'm trying to connect to the eprint centre, I get my email and password and I get the above message. If I press "I"don't remember my password", the OK button is not pressed. What can I do? Any help?

  • Tab A7 sound problem

    Hello, I just bought this camera and I noticed that the upper speaker does not work. The bottom works fine, however. Is it a hardware problem. Thank you.

  • Download failed KB973768 XP

    I have the XP operating system and use the automatic update system.  Download KB973768 won't install downloads and so every day and then fails.  This is an important and, if so download, how to download and install correctly and, in the alternative,