On a background gradient image

I'm doing an area with a gradient background.  The screen has an image as a background, but I can't make a gradient on a picture.  When I remove the image filling appears. And the image should not be hide the filling because I add before that I draw the fill.  Here is my code:

var bg:Image = new Image();
bg.setImage("assets/bg.jpg");
bg.x = 0;
bg.y = 0;
this.addChild(bg);

var matrix:Matrix = new Matrix();
matrix.createGradientBox(400,400);
            this.graphics.beginGradientFill(GradientType.LINEAR, [0x111111, 0xFF0000], [1,1],[0,255],matrix);
this.graphics.drawRect(0,0,400,400);
this.graphics.endFill();

Graphic stuff are pulled behind all the children, so this does not work as expected.

If you want the gradient on the bitmap image, you will need to add a shape as a child also, after the Image and draw in the graph of the form instead.  (or a Variant similar to account for this behavior)

Tags: BlackBerry Developers

Similar Questions

  • Hi, im working with 2 1920 * 1080 monitors and you want to display a background thar image is on a resolution of 3840 * 1080 and I wanted to be half on each monitor. can u help me?

    Hi, im working with 2 1920 * 1080 monitors and you want to display a background thar image is on a resolution of 3840 * 1080 and I wanted to be half on each monitor. can u help me?

    Friday, July 20, 2012 14:35:27 + 0000, GastonBriatore wrote:

    Hi, im working with 2 1920 * 1080 monitors and you want to display a background thar image is on a resolution of 3840 * 1080 and I wanted to be half on each monitor. can u help me?

    Windows does not allow you this. However, you might be able to find a
    third party program that could do this.

    Ken Blake, Microsoft MVP

  • setStyle ("background - fx - image :...") con Netbeans 7.4

    Use Netbeans 7.4 e non riesco ad immagine di sfondo assegnare an AnchorPane UN oggetto.

    L'immagine background.png TR trona nel source package insieme alla class che the use.

    Ho scritto in diversi modi the training:

    anchorpane.setStyle ("background - fx - image: url ('background.png');...") »

    anchorpane.setStyle ("background - fx - image: url ("background.png");...") »

    anchorpane.setStyle ("background - fx - image: url(\"background.png\ "');... »

    my error e sempre lo stesso: java.lang.NullPointerException

    Grazie

    Alberto

    Actually anchorpane era since null non avevo awarded fx:id nel file FXML.

    Infine corrette sono the seguenti istruzioni:

    The string image = MyClass.class.getResource("background.png").toExternalForm ();

    anchorpane.setStyle ("background - fx - image: url (" "+ image +" ");") background - fx - position: Center Center; ») ;

    Grazie

    Alberto

  • Custom background gradient for ToolTip color

    Hello

    I created a custom ToolTip where I use light gray background color.

    (I created a separate custom tooltip component.)

    Now user wants her to be with a gradient effect (is that his name?).

    Basically, this gray color should be darker in the region at the top of the ToolTip page.

    This color goes progressively lighter from top to bottom.

    Can you tell me how this can be done?

    Thank you and best regards,
    Amey

    Hello.

    Sorry, my mistake - I guess you use flex 4.

    This message tells you how to add a gradient to a background of vbox: ers http://butterfliesandbugs.wordpress.com/2007/06/08/generic-background-gradient-for-contain /

  • TitleWindow with dynamic background gradient

    I am new to Flex 4 and how component with sparks of the skin. I'm doing a TitleWindow personalized with a dynamic background gradient in a style sheet.

    Is there a way to define a CSS class to a gradientEntry?

    This is my actual code for the gradient:

    < s:Rect height = "406" d: id = "3" width = "430" x = "0" y = "0" >
    < s:fill >
    < s:LinearGradient = scaleX = "270" rotation "406,028" x = "214.981" y = "406.028" >
    < s:GradientEntry color = "#303030' ratio = '0' / >
    < s:GradientEntry color = "#141414" ratio = "0.854545" / >
    < s:GradientEntry ratio = "1" / >
    < / s:LinearGradient >
    < / s:fill >
    < s:filters >
    < s:GlowFilter alpha = "0.85" color = "#000000" quality = "2" / >
    < / s:filters >
    < / s:Rect >


    It is the result that I want:

    titlewindow.jpg

    Here is an example of gross that I managed to make it work. It is not sure how ideal, but it seems to work:

    
    http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx">
    
        
            
        
    
        
            .foo1 {
                bgFillGrad: red,haloOrange;
            }
            .foo2 {
                bgFillGrad: yellow,haloGreen;
            }
            .foo3 {
                bgFillGrad: haloBlue,purple;
            }
        
    
        
            
        
    
        
            
        
    
        
            
        
    
    
    
    And I have attached my custom skin of TitleWindow spark, GradTitleWinSkin.mxml. It was a bit too long to paste here. The code that I changed was around lines 244-265, and more I added the following code around line 106-107.
    
    grad1.color = String(getStyle("bgFillGrad")).split(",")[0];
    grad2.color = String(getStyle("bgFillGrad")).split(",")[1];
    
    No doubt of the best ways to do it, but it has been fast and apparently worked (even if I don't add any error checking, so I don't know what would be wrong if you spent 0.1, or 3 + colors in the custom style bgFillGrad.)
    Peter
  • Need help creating simple Gradient image sequence

    New to After Effects program. I am trying to create a radial gradient that I can export as jpg or png image sequence to use as a mask to run my animation in 3D Modo. I can hand paint that the sequence of images in Modo, but painting handmade 450 executives will make me lose my mind. I know there is a way to put 1 black frame of kew and 1 final frame of the large circle and have AE interpolate all inbetween then convert each frame to make the image sequence.

    tried searching and reading online, but couldn't find a clear tutorial. Any help is greatly appreciated.

    The photo is just a quick sketch to show what I'm after.

    THX

    brand1.png

    I thought that I have would illustrate method of Rick, but because I don't know what background you use I also illustrated the ways to use a collar of material or feathered masks to make the edges of a solid or gradient white transparent.

    A: this is what looks like a radial shape with a ramp layer.  The edges will be solid on a transperent background, but you can add Matt neck if you want to soften the edges.

    B: a solid white with a mask elliptical may simply be feathers so that edges are transperent.  Draw the circle with the elliptical mask tool all holding the shift to create a perfectly round circle.

    C: it's the same shape layer with a ramp radial as shown in the figure A only shown on a black background, a background.

    D: this is the same white solid as shown in image D only with edges to feathers on a black background.  An upside to do this way is that you don't have to animate the departure and arrival of the ramp if you decide to animate the position of the circle.

  • Personas display only background colors, images, that I have the latest version

    For a while now, I tried to use personas, but only some work, others show that background colors and images

    You use the default theme?

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • PowerPoint 2010, help, how, do, I, place, background, one, image, object or picture, to show, in, each, slide

    With the help of Microsoft PowerPoint 2010, how can I place a photo, the object on the background or the image to appear on each slide?

    You better ask this question in the Microsoft PowerPoint forum.

  • I lost my desktop background on image and I'm left with one blank screen other than the icons

    I am a user of Skype and when I go on Skype I lose my background image the top desktop icons on the desktop are always there but except that I have now a screen empty, I had this back by a movement of system restore but I have now lost the image again using Skype again! How to solve this problem?

    Hi RaymondManley,

    1. did you of recent changes on the computer?

    2 when was the last time it was working fine?

    3 return the wallpaper if you close the Skype program on the computer?

    4. do you have security software installed on the computer?

    Method 1

    It is possible that some third-party programs installed on the computer is causing the problem.

    I suggest that you put the computer in a clean boot state and check if it helps.

    To help resolve the error and other messages, you can start Windows XP by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

    See the link below to learn more about how to clean boot.

    How to configure Windows XP to start in a "clean boot" State

    http://support.Microsoft.com/kb/310353

    Reset the computer to start as usual

    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:

    (a) click Start, type msconfig in the search box and press ENTER.

    (b) If you are prompted for an administrator password or for confirmation, type your password or click on continue.

    (c) under the general tab, click the Normal startup option, and then click OK.

    (d) when you are prompted to restart the computer, click on restart.

    Method 2

    If the previous step fails, then I suggest that reduce you the hardware acceleration on your computer and check if it helps.

    (a) click Start, click run, type desk.cpl, and then click OK.

    (b) click on the settings tab and then click Advanced.

    (c) in the performance tab or on the Troubleshooting tab, move the Hardware Acceleration slider to the left to reduce the acceleration.

    (d) click OKand then click close.

    (e) If you are prompted to restart your computer, click Yes.

  • Background screen images of Bing stopped appearing as my desktop wallpaper

    It started yesterday. My office was simply in black instead of display a new screen of Bing background image. So, I went up to the bar, found an old image clicked and he appeared again as my desktop wallpaper. The same problem happened today. No new image Bing walllpaper. The Bing toolbar let me use only today or yesterday image, seniors will be wallpaper. The new 2 yesterday and today cause a black screen. Please fix this. I use Windows Vista Edition Home Premium. My laptop running Windows 7 behaves very well regarding bNouveau Bing wallpaper images.

    Hi Greg,.

    According to the description, it seems that you are having problems after installing the Office of Bing. I will definitely help you with this problem.

    As the matter limited to the Desktop Bing app, I suggest you write your topic in Bing forums to get help.

    https://support.DiscoverBing.com/eForm.aspx?ProductKey=bingdesktop&CT=eformts

    I hope it helps. If you have any questions about Windows in the future, please let us know. We will be happy to help you.

  • Background desktop images is not full screen

    Original title: pozadie pracovnej plochy

    When I give the image of wallpaper of my images,
    wallpaper appears

    not all photo (which I stored in my pictures), but only the section part of the whole picture.

    It seems bigger then a screen?
    Why?

    Thank you for any response

    Hi Zlatko,

    ·         What is the desktop resolution?

    ·         Are all the photos in the same resolution?

    You may experience this problem if the position of the image is not defined correctly for. wallpaper Follow these steps and check if that helps:

    Step 1: Change the position of the background image of the image of the desktop:

    (a) on the start screen, press or click on desktop.

    (b) press on and hold or right click on an open space on the desktop and then tap or click Customize.

    (c) click on wallpaper, under the Position of the image changes the fill or fix and check parameters

     

    Step 2: Check the resolution of your screen. To do this:

    (a) right click on the desktop, and then click screen resolution and your resolution will be written by virtue of the resolution. He notes down.

    (b) now, right click on your image and click on modify. It will open the painting. There is option resize select it and then clear the check box maintain proportions and pixels-click and type your resolution width then height, and then click ok and then save your picture again with a different name.

    (c) close everything and go back on the desktop and select again your navigation screen background image newly save image. Everything will be fine now.

    For reference, see this link:

    Change your background, colors, lock screen and photo account

    http://Windows.Microsoft.com/en-in/Windows-8/change-backgrounds-pictures

    Work in the familiar office

    http://Windows.Microsoft.com/en-us/Windows-8/desktop

    I hope this helps. If you need help with Windows, let us know and will be happy to help you.

  • How can I create a background gradient which does not affect the readability of the words in the foreground?

    Screenshot (27).png

    Note that the words seem to disappear as the blue becomes more important?

    How can I fix it?

    In addition, since I work more than 30 plans, is there a general framework that needs to be changed?

    Furthermore, this gradient was created using the gradient tool, and is therefore not part of the background.

    Under file-> Document Setup, I found that you can create a background Uni but see no options for a gradient fill.

    I would appreciate help.

    I'm like your gradient is above the text.

    Select your gradient and the hit Shift + Ctrl + [ ]

    This should send your gradient to the back behind the text

  • How to import moving in first with a transparent background GIF images?

    I have an animated gif that I got from the internet, and I'm trying to import into Premiere Pro with a transparent background. The gif is a motionless, flashing video game character. Whenever I import it, it always has a white background, so I need help on how to change this.

    I went into Photoshop and removed the white background image by image, making it transparent. I have it using the magic wand tool to select the white background, then press 'delete' to make this grid of diamond, which means that it is transparent. I then select file-> save for Web. I saw each image, and it shows that the funds are transparent. I have to save it in a gif file. But when I import into Premiere Pro, the white background is still there.

    I read many forums online on the people trying to import images into Premiere Pro with a transparent background, but none of them explained how to do specifically for animated gifs. Each answer has always been "export image into a png image, which is going to work" and of course, I exported some frames of the gif, png, and these images have transparent backgrounds in Premiere Pro. But I don't want a png because that is not the animated sequences, those who may be still images. I need to export it to a gif file so that it remains lively, but gif files always have this white background dreaded in Premiere Pro.

    I guess I could export each image as a PNG, each of these frames import into Premiere Pro, then string together all the frames and twist them so they will be functionally identical to the animated gif image, but that would take forever. I am doing a video project and I need many gifs animated work, so I don't want to do this with each of them. I'm looking for a way to simply import GIF files into Premiere Pro and be done with it. If there is a way to do this, please help me.

    -Robert

    Try to make the QuickTime video (I think that default h.264 exports no Alpha channel).

    And in project brouser right click on the clip, film (I don't remember how it the CS6). Settings out there for an Alpha channel.

  • How to put a background gradient with the scrolling of the mouse?

    I would like to place a background image to fade when I go down with the mouse wheel, can someone help me?

    You cannot use the option "background Fill" in Muse to make appear an image fade, you can only move.

    But you can move the image to a specific page and make bland using the Panel "effects scroll."

    See image attached:

  • Change the base color of a raster with a gradient image.

    Hello

    I have a small picture of raster (png) (8 wide x 75 pixels) high I have beautiful is looking for arrangement or gradient shades of green.  I have a site of sample that I created during playback in class CC of DreamWeaver in a book that contains this image horizontally to create backgroung for a navigation menu.

    I want to "recreate" the same effect for my own site, but in shades of gray instead of shades of green.  Can someone tell me what is the best way / tool in Photoshop or Illustrator that would allow me to change this raster image so that every shade of green is converted to a corresponding shade of gray, while retaining the same general effect / appearance that I try to recreate?  If you could point me to a tutorial or explanation of how to do this, I would really appreciate it.

    Thanks in advance,
    Paul

    One of the simplest ways is to simply convert your color to grayscale image.

    • Image > adjustments > Desaturate or shift-ctrl-u (windows) shift-cmd-u (mac)
    • Image > adjustments > black and white, this filter will allow you to preview so that to change individual colors if necessary to darken or lighten the shade. (That would be more sensitive with a multi color image)
    • Image > adjustments > cmd - u (mac) Hue and Saturation or ctrl-u (windows) this command will allow you to desaturate a color or change its hue and or brightness. (This works well to change from green to blue for example but will work to desaturate both green)

    Most of the people is called destructive commands because they are permanent.

    • Layer > new adjustment layer > Hue/Saturation
    • Layer > new adjustment layer > black and white
    • Layer > new adjustment layer > gradient map

    Here are the layers while not destructive in that you can go any time back and change this setting assuming that you save in a format that takes in charge the layers. As psd or tiff.

Maybe you are looking for

  • Satellite U505-SP2017L - I need readers for XP

    I need drivers for XP that I'm missing model PCI \ VEN_8086 & DEV_0046 & REV_12 & SUBSYS_FF401179 - VIDEO PCI \ VEN_8086 & DEV_3B64 & SUBSYS_FF401179 & REV_06 - Simple PCI communications controller HDAudio \ FUNC_01 & VEN_8086 & DEV_2804 & REV_1000 &

  • Pavillion 500-056: memory

    My office has four ram slots. Two blue and two back. Right now I have 8 GB of ram in the blue slot of Babu. I'll add another 8 GB of ram. Should I put it in the second blue slot? Not sure if I use the blue or black slot or is it important.

  • USB to pcmcia?

    Greetings, Just got a new computer @ work & it's not a PCMCIA slot.  I do a lot of development using 6036 series cards, PCI and PCMCIA.  Did anyone tried a USB to PCMCIA with the DAQCard-6036E multi i/o? Speaking of something similar to this... http:

  • User accounts get corrupted!

    OS: Windows XP SP3my computer was working fine until a week ago.Basically, I have 1 Admin account, 1 account administrative privileges and 2 limited accounts.now there are 4 days, I logged t my admin account, but it connected me with a temporary prof

  • HP Officejet 6500 E709n

    I am running Windows 7 Home Premium on an HP Pavilion Slimline with a HP Officejet 6500 E709n wireless printer.  Windows updates were installed and security software is in place.  System has been scanned for viruses and malware and detected no cases.