Background color of the default bitmap

How can I set the default background for a Bitmap color?

It seems that the default value is white. I want it to be transparent.

The following code returns a white image.

Bitmap BM = new Bitmap (50, 50);
Graphics g = Graphics.create (WB);
return of bm;

I have a more complicated code to do the same thing.  I don't know what is important, so I'll post it here and maybe someone can tell Ms. If the extra complexity means something.

Image bitmap newBitmap = new Bitmap (Bitmap.ROWWISE_16BIT_COLOR, bitmapWidth, bitmapHeight);
newBitmap.createAlpha (Bitmap.ALPHA_BITDEPTH_8BPP);
Clear the Bitmap...
int [] argbData = new int [bitmapWidth];
for (int i = 0; i)< argbdata.length;="" i++="" )="">
argbData [i] = 0; Clear table
}
for (int i = 0; i)< bitmapheight;="" i++="" )="">
Write our argb data in each row of the Bitmap
newBitmap.setARGB (argbData, bitmapWidth, 0, 0, i, bitmapWidth, 1);
}

Tags: BlackBerry Developers

Similar Questions

  • Try to change the background color to the default settings on windows XP Professional

    Original title: background colors of Windows

    A few months ago something apparently got reset or changed the way my colors of background on web pages are displayed. I tried to get this return a default value for Windows xp professional but nothing I have seems to work. I am at a loss as to why or how this has changed. If anyone can help me with a few solutions for this I understand that.

    Thank you for your help

    Hello

    1 have. what measures you tried?

    See the bottom of the articles that might help you change the background color.

    To customize a background color
    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/display_change_background_color.mspx?mfr=true
    To change the background properties, graphic, text, colors and fonts
    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/nt_sysmon_copysetappearancerproperties.mspx?mfr=true

  • Setting the background color of the default work in Photoshop CC 2015 plan

    So here's the thing, I am aware that right-clicking on a background of work plan will allow you to change its color, but I'm looking for a way to set the default color. I prefer the background color of artboard to a gray color dark, but the default is light gray, so I have to change every time I open a new document. All solutions?

    Well Yes. Currently, it is an enhancement request. A good one, I might add.

    In the meantime, you can probably create a template with the desired background and use for newly created documents.

  • How to set the background color for the Webworks Menu?

    Hi all

    I have developed a web application that uses the emulator to ripple and Blackberry Webworks SDK 2.3.1.5.In I added the Menu items on the Blackberry Menu button... It works well... It contains the background color by default for Menu (Black)... Here, I want to change the background color of the Menu... Please help me to change the background color... Thank you very much..

    With respect,

    Marimuthu_P

    I don't think that this is possible.  The WebWorks API allows you to add menu items to your application does not provide the ability to change the background color by default of the menu.

    This API is actually an extension of Java built into the SDK WebWorks.  The source code because it's open source, available here: https://github.com/blackberry/WebWorks/tree/master/api/menu/src/main/java/blackberry/ui/menu

    It is based on the Java class "MenuItem", which as you can see it does not provide methods or properties to set the color:

    http://www.BlackBerry.com/developers/docs/7.1.0api/NET/rim/device/API/UI/MenuItem.html

  • How can set the background color of the status bar?

    Quote from the old forum:

    Comments: comments
    How can set the background color of the status bar?
    Posted the: July 17, 2008 02:56
     
    How can set the background color of the status bar?
    Using this code for the status bar:
    LabelField statusField = new LabelField ("Good Morning", LabelField.USE_ALL_WIDTH |) LabelField.NON_FOCUSABLE | LabelField.HCENTER)
    {
    int _backgroundColour = Color.LIGHTGREEN;
    public void paint (Graphics g)
    {
    g.setBackgroundColor (Color.RED);
    g.Clear ();
    Super.Paint (g);
    }
    };

    Font defaultfont = Font.getDefault ();
    Police smallfont = defaultfont.derive (Font.PLAIN, 12);

    statusField.setFont (smallfont);
    setStatus (statusField);

    When I ran the code you have above, my status background color was red.  Is not what you see?  If so, please provide the BlackBerry model and software version that you are testing.  You can find this under Options.

    Or if you try to do something else, please provide details.

    I tested this in the BlackBerry Simulator included with version 4.5.0 BlackBerry JDE (4.5.0.44).

    To do this in version 4.1, first call getColor and save the current color.  Then call setColor, setting the color to the color you want to use for the background.  After this call call fillRect, starting with 0, 0 and go to the size of the field (use this.getWidth () and this.getHeight () to get this).  This must fill in the field with your specified color.

    To allow the drawing of the default content of the field call setColor once again, passing in the original color, then call super.paint.

  • How to set the background color of the title?

    Generally, the title background color is black and the other area of the main screen is white. I want to set the background color of the linear gradient background as blue or something. I try the following 2 ways, but there is always a black line at the bottom of the title bar.

          Background background = BackgroundFactory
                    .createLinearGradientBackground(0x00ff0000, 0x00ff0000,
                            0x0000ff00, 0x0000ff00);
            LabelField title = new LabelField("Hello World Demo",
                    LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
            title.setBackground(background);
            setTitle(title);
    
           LabelField title = new LabelField("Hello World Demo",
                    LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
    
            HorizontalFieldManager hrzManager = new HorizontalFieldManager() {
                protected void paintBackground(Graphics graphics) {
    
                    graphics.setBackgroundColor(0x00382B79);
                    graphics.clear();
                    super.paint(graphics);
                }
            };
            hrzManager.add(title);
            setTitle(hrzManager);
    

    Hello

    I think that there may be a problem using the default setTilte() method.

    Have something by default, behavior with the device.

    It may be a way to customize the default title to remove the black line at the bottom of the title bar.

    But I suggest an alternative that will behave like the title bar without using the setTitle() method.

    You can use something like below to get your condition.

    import net.rim.device.api.ui.*;import net.rim.device.api.ui.component.*;import net.rim.device.api.ui.container.*;import net.rim.device.api.system.*;
    
    class TestScreen extends MainScreen{
    
        private VerticalFieldManager verticalManager;    private HorizontalFieldManager hrzManager;
    
        TestScreen()     {            super(NO_VERTICAL_SCROLL);
    
            LabelField title = new LabelField("Hello World Demo",                        LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
    
            hrzManager = new HorizontalFieldManager()         {            protected void paintBackground(Graphics graphics)             {                graphics.setBackgroundColor(0x00382B79);                graphics.clear();                super.paint(graphics);            }        };        hrzManager.add(title);        this.add(hrzManager);
    
            //rather than  adding component in the mainScreen        //add components in this verticalManager and then        // add this manager to mainScreen          verticalManager = new VerticalFieldManager(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR)        {            /*              public void paint(Graphics graphics)            {                graphics.setBackgroundColor(0x00ffffff);                graphics.clear();                super.paint(graphics);            }            */                        protected void sublayout( int maxWidth, int maxHeight )            {                int width = Display.getWidth();                int height = Display.getHeight() - hrzManager.getHeight();
    
                    super.sublayout( width, height);                setExtent( width, height);            }        };
    
            ButtonField button1 = new ButtonField("Button1");        ButtonField button2 = new ButtonField("Button2");        ButtonField button3 = new ButtonField("Button3");        ButtonField button4 = new ButtonField("Button4");        ButtonField button5 = new ButtonField("Button5");
    
            verticalManager.add(button1);        verticalManager.add(button2);        verticalManager.add(button3);        verticalManager.add(button4);        verticalManager.add(button5);        this.add(verticalManager);
    
        }}
    

    Concerning

    Bika

  • How to change the background color of the code written DW page but not the Web page...

    How to change the background color of the code written DW page but not the Web page...

    If you have DWCC2015, you can change to edit > Preferences > coloring Code and either choose a new theme (RecoGnEyes is the background dark code by default) or you can change it to what you want in the background field by default.

    2014 CC had no theme options, but you can change the background color in the same place.

    I think that some of the previous versions also had the option, but I don't have them on my machine to check.

  • Change the background color of the slide show full-screen when the option fit content proportionally

    I signed up for a demo of Muse and I must say that I am very impressed. After using Dreamweaver in the past in school, often get bogged down in the code, Muse is a designers dream. I even told a few friends about it, calling for «InDesign for web designers» The features and tutorials on Adobes site, are fab but I need now to a little help.

    I want several images to fit the entire screen on a specific section of my Muse site, just below the navigation bar. I noticed the best way to do this is to create a slideshow full screen. With this option I can add one or more images fade in and out - communicate various messages and points of sale. By default, as the widget options are defined in the charging framework, which extends from my image to completely fill the browser. Unfortunately with this selected the image loses some quality and seems to zoom in, getting cropped in the process. When you change the settings to adjust the content proportionally everything looks great. The chart is smack bang under my sailing as I desire however there is also a horrible gray area each side because the graph is now its original size. Grey on each side seems to be the background color of the slideshow, but I can't find a way to change this - from grey to black. Please check the link for more information: https://dl.dropboxusercontent.com/u/50403221/Screen%20Shot%202014-08-14%20at%2018.00.34.pn g

    If any colleague Musers know of a way around this? Or maybe it's an enhancement request?

    Thanks, Chris

    Hi Chris,

    You can select the slideshow widget that you added and check the fill color in the control panel.

    Please refer to the following screenshot:

    Kind regards

    Akshay

  • Change the background color in the template

    I am new to using DW and ran into my first problem. After I created a page I that is a model for multiple pages. I chose my sidebar and the content of the boxes on the models. I am in a model and you want to change the background color in the sidevar and it won't let me. Now I can add content in the sidebar. Why it won't let me change the background since the sidebar color is an editable? How can I change the color? The default value is a tan color and I want to change it to white.

    As Jim mentioned, is that you try to change in the CSS to your page; It is not in the HTML code in your editable region. You must put the CSS code in an editable region to customize the background color for .sidebar1.

    To do this, go to your template file, locate the part of the code that contains the CSS for .sidebar1 (probably in the)somewhere) and make an editable region. Then, save the model again and update the page you are trying to edit.

  • background color in the character Style

    Hello

    Can I add padding and background color in a character Style?

    Thank you

    Not both.

    Is the common trick to add a background color to the underline for a very thick line (about the width of your leader) and the appropriate color and set the offset to move "up" behind the text (the default is to descend to the base of his thick line).

    You can not add padding left and right in a character style, you need to add some spaces (thin, or what you need) by hand.

  • Help define the background color in the browser

    I'll put up my web pages be 960 x 600 pixels (or possibly 960 x 660).  How to set a background color for the overflow in case of people look on superior to the 1024 x 768 resolution - now everything outside my Web page presents itself as the default white.

    Thank you

    Use CSS.

    Body {background-color: Heliotrope ;}}

  • change the background color of the interactive reports

    Hi all

    I'm trying to change the background color of the interactive report. Is there anyway where I could change the background color of report? My all other reports are using custom background color, but in the case of report interactive, I couldn't manage change its default background color.

    Thank you
    Manish

    Hello

    Sorry, you said custom background color, so I thought you had that. The color I put here is just white, so you may have to adjust to match your custom color

    Probably the easiest way is to create an HTML region without a model to 0 in the position after the page header. Can use it as the source of the region

    
    

    You can also put in the page template or an external CSS file.

    If your has begun on CSS I suggest that you spend an hour or two reading this site [http://www.w3schools.com/css/], it will save you hours more later any web development environment you use

    Kind regards
    Carl

  • How can I change the background color of the sidebar bookmarks?

    Grayish brown (I think) background color does not work for me. I'm a little color blind and the cursor to highlight the selected tab is not enough for me to easily see contrast. I found how to change all kinds of colors in FF, but not the background color of the bookmarks bar. I would like to change the background may be blank.

    I have it! My eyes thank you very much for your help!

  • How can I change the background color for the bar 'help file edit view history bookmark tools' in Firefox 29,0

    How can I change the background color for the bar 'help file edit view history bookmark tools' in Firefox 29,0

    You can add a theme of solid color to change the color of the top of the browser window, which contains the Menu bar.

    https://addons.Mozilla.org/en-us/Firefox/themes/solid

  • background color affecting the browser of LabVIEW

    I want to use snapshots of the LabVIEW browser in some documents.  Is there a way to put the white background color of the browser?

    Earl

    Hi Earl,

    It is the great 'code capture tool' can be found here on the forum or on the LAVA.

    Just search for "CTC" to find threads like this...

Maybe you are looking for