OS 6.0 - paint background does not respect the global alpha

Hi all

I debugged the following code (this is a complete application that brings together up to 4.7 and up - and we can go back on required versions by substituting Graphics.create (Bitmap) (deprecated in 4.7 and later) new Graphics (Bitmap)) and found that there is a regression in OS 6.0 on real torch and the Simulator.  Previous models of phone everything works perfectly (I've tested of 8830 with 4.2.1 up to 9700 and Storm2 5.0).

In short, if I use graphics.setGlobalAlpha () and then graphics.setColor () and graphics.fillRect (), the transparency is honored. If, after the setGlobalAlpha(), I use graphics.setBackgroundColor () and clear, the result is completely opaque.  The code below demonstrates the problem.  It requires no signature and is small enough to quickly deploy on the phone without having to reboot - try it on simulators and different phones and compare:

import net.rim.device.api.system.Bitmap;
import net.rim.device.api.ui.Color;
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.Font;
import net.rim.device.api.ui.Graphics;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.ui.container.VerticalFieldManager;

public class TestOpacity extends UiApplication {

    /**
     * @param args
     */
    public static void main(String[] args) {
        new TestOpacity().enterEventDispatcher();
    }

    public TestOpacity() {
        MainScreen scr = new MainScreen();
        final Bitmap background = new Bitmap(200,200);
        Graphics drawToBG = Graphics.create(background);
        Font font = Font.getDefault().derive(Font.PLAIN, 24);
        int fontHeight = font.getHeight();
        drawToBG.setFont(font);
        drawToBG.drawText("Sample 1", 2, 2);
        drawToBG.drawText("Sample 2", 2, fontHeight + 2);
        drawToBG.drawLine(2, 100, 197, 100);
        drawToBG.drawText("Sample 3", 2, 200 - 2 * fontHeight - 4);
        drawToBG.drawText("Sample 4", 2, 200 - fontHeight - 2);
        VerticalFieldManager vfm = new VerticalFieldManager() {
            protected void paintBackground(Graphics g) {
                g.drawBitmap(0, 0, background.getWidth(), background.getHeight(), background, 0, 0);
            }

            protected void sublayout(int w, int h) {
                w = Math.min(background.getWidth(), w);
                h = Math.min(background.getHeight(), h);
                super.sublayout(w, h);
                setExtent(w, h);
            }
        };

        Field fld1 = new Field()    {
            protected void layout(int w, int h) {
                setExtent(w, h/2);
            }

            protected void paint(Graphics g) {
                int opacity = g.getGlobalAlpha();
                g.setGlobalAlpha(150);
                int color = g.getBackgroundColor();
                g.setBackgroundColor(Color.BLACK);
                g.clear();
                g.setBackgroundColor(color);
                g.setGlobalAlpha(opacity);
            }
        };

        Field fld2 = new Field()    {
            protected void layout(int w, int h) {
                setExtent(w, h);
            }

            protected void paint(Graphics g) {
                int opacity = g.getGlobalAlpha();
                g.setGlobalAlpha(150);
                int color = g.getColor();
                g.setColor(Color.BLACK);
                g.fillRect(0,0,getWidth(), getHeight());
                g.setColor(color);
                g.setGlobalAlpha(opacity);
            }
        };

        vfm.add(fld1);
        vfm.add(fld2);
        scr.add(vfm);
        pushScreen(scr);
    }

}

It comes from our friends on the EDGE of debug and difficulty both for other BlackBerry programmers have a work around...

Please report it in the BlackBerry Issue Tracker: https://www.blackberry.com/jira/secure/Dashboard.jspa

Tags: BlackBerry Developers

Similar Questions

  • 15.1 TMS does not respect the preferred routing protocol

    TMS 15.1

    C series: TC7.2.1, TC7.3.4

    SX20 and 80: TC7.3.4 and EC8.01

    All the saved settings to VCS with addresses both H.323 and SIP.

    Conference TMS-settings of parameters / advanced: shares of routing protocol: H.323

    By default the Protocol of appeal located on all the evaluation criteria: H.323

    When creating new conferences, connection parameter is defined as "SIP" despite the preference above, this to H.323 does not change the connection string to [email protected] / * / the alias preferred without any suffix.

    I do not see anything either in the TMS open and resolved the issues list, then, until I opened a case with TAC, has anyone already opened a file, or found a way to solve this problem? (Couldn't see this issue in TMS 14.4.x)

    Thank you/Bravo

    /Jens

    Hi Jens,

    I can't reproduce your problem here.  I have two end points recorded on my VCSes, and when their scheduling in TMS 15.1.0 it is showing that H.323 in connection settings.

    If I click on "Settings" under the Action on the far right of the display of connection settings in MSD, I can change it to "IP - SIP" and used addresses change to SIP, and if I change it back to "IP - H.323", it changes again in the H.323 addresses.

    Wayne

  • APX1099 process does not respect the "output Destination.

    Hi friends!

    I have run the APX1099 process to print COPY B 1099 files and I'll put the 'output destination' until I run it:

    P.S. I have administrative privileges for this directory.

    4-8-2015 11-08-12 AM.png

    But the files are generated in a different directory and I can not find where this directory has been created (\appserv\prcs\psdev\files\XMLP). The process does not have the 'output destination' that I put forward.

    Does anyone have an idea what could be causing this problem?

    P.S. The output location in report definition routine is defined as "all":

    4-8-2015 11-37-27 AM.png

    Thank you very much for your help!

    Kind regards

    Tarsio Alvares

    Tarsio Alvares based on code, I see in the App Engine, writing of file is not managed.

    You can see that OutDestType = 6 (Web) and % OutDestType = 3 (printer) are dealt with. Technically, should also have some code for % OutDestType = 2 (file) to cover for the file option.

    You will need to write the following code to operate temporarily. Moreover, wear it like a SR with Oracle that this appears to be a delivered report and should be able to print to file.

    If OutDestType = 2 Then %

    & REPORT_DEFN. OutDestination = FilePath %;

    End - If;

    As follows:

    Let us know if that helps. Once I added this code, it seems to work very well when I'm printing to a file. Thank you!

  • Automatic after update 6.5 does not respect the ID_FLUX

    Hello!

    Once the update to 6.5 automatic does not seem to respect the parameters of ID_FLUX. At least for recently added items, only it looks overall of all foods, no juice in the ID_FLUX defined in the config file

    Strange, I deleted the new show elements and add them manually (previously it was copy-and - paste to Evernote) and doesn't work very well.

    I have a suspicion some characters have been copied with codes utf frong and unrecognized by the application correctly.

  • Adobe Acrobat DC does not respect the parameters of the "first sight".

    I often have to exit from InDesign for proofing to the initial view of two to the top of the cover page. It's so customers can see brochures and so forth as they would print. It worked fine pre Acrobat DC.

    Acrobat DC no longer seems to respect this setting 'initial view' - I have to switch to mode > Page Display.

    This is minor, but it is extremely irritating.

    Any help appreciated.

    Ruth

    Check the accessibility preferences.

  • ConverterCollection.contains () does not respect the contract

    Hello

    I am using an aggregator to see if the result of an aggregation is not empty. You can see the code below. In the aggregateResults(Collection results), the returned result is a ConverterCollection.

    When I call
    results.contains( Boolean.TRUE )
    This returns false. However when I change it by using the following:
                   for (Object object : results)
                   {
                        if (object.equals(Boolean.TRUE))
                        {
                             return true;
                        }
                   }
                   return false;
    This returns true. This should not give me the same thing?

    Here's the complete code aggregator.
         public static final class IsNotEmpty implements ParallelAwareAggregator, ExternalizableLite {
    
              private static final long serialVersionUID = 1L;
              public static final IsNotEmpty INSTANCE = new IsNotEmpty();
    
              @SuppressWarnings("unchecked")
              public Object aggregateResults(Collection results) {
                   if (results.isEmpty()) {
                        return Boolean.FALSE;
                   }
    
                   return contains(results) ? Boolean.TRUE : Boolean.FALSE;
              }
    
              private boolean contains(Collection results)
              {
                   for (Object object : results)
                   {
                        if (object.equals(Boolean.TRUE))
                        {
                             return true;
                        }
                   }
                   return false;
                   //             return results.contains( Boolean.TRUE );   --> this would return false even if there's a Boolean.TRUE in the collection
              }
    
              public EntryAggregator getParallelAggregator() {
                   return this;
              }
    
              @SuppressWarnings("unchecked")
              public Object aggregate(Set candidates) {
                   return candidates.isEmpty() ? null : Boolean.TRUE;
              }
    
    
              public void readExternal(DataInput input) throws IOException {
    
              }
    
              public void writeExternal(DataOutput output) throws IOException {
    
              }
         }
    I use coherence 3.4.2.

    Best regards
    Jan

    Hi Jan-

    The contains() method is implemented, but it delegate to the underlying collection. It uses the "down converter" to the value that you provide and it becomes the format used by the underlying connection:

    public boolean contains(Object o)
        {
        return getCollection().contains(getConverterDown().convert(o));
        }
    

    Unfortunately, no one expected the "step-down" deemed necessary; that is, it expected that binaries need to be converted to objects but not vice versa. If you check the return value of getConverterDown() of this ConverterCollection, you will find that it is a converter "null." This was noted as COH-2723, and will be fixed in the next version. your workaround solution is appropriate for now.

    Peace,

    Cameron Purdy | The Oracle coherence
    http://coherence.Oracle.com/

  • Graphic cursor size does not respect the Bode plot

    Hello

    I was wondering if someone would be able to shed some light on a problem I'm having about a graph XY cursor.

    I developed a simple VI to determine the characteristics of a low-pass filter through which a sinusoidal signal ramp frequency and subsequently followed the gain of the filter to create a Bode plot.

    Through the analysis of the curve of Bode I want to determine the cutoff frequency of depression go the filter under test. I introduced a slider in the chart and using a property node I have hoped to set the cursor to-3dB point in the Y axis and the corresponding sliders X post thus determining the cutoff frequency of the output filter.

    However the slider seems never to follow the plot beyond the first stage of the loop. It feels as if there is a break in the conspiracy between the 1st and 2nd iteration of the while loop used for the ramp signal generator.

    I tried to find why the cursor won't follow the plot at-3dB, but so far I am confused.

    Any help or advice you could provide would be greatly appreciated! I have provided the attached VI for clarity.

    I corrected your VI.

    First of all, you need to put the property node AFTER the while loop, because you need the chart to be done first and then watch the cut off frequency.

    Secondly, in LV, property nodes are read from top down. So you have to move the cursor to Y =-3 first, and then read the X position.

    I have attached the corrected vi

  • Fusion does not respect the comments (Windows) connection settings

    Hello.

    I have Windows XP as the operating system invited to merger (2.0.5). Although I have implemented several users in Windows, protected by password, Fusion will automatically start as administrator.

    Is it possible to force the merger to the windows login parameters so that the user must choose the corresponding user profile and enter the password?

    Thanks in advance.

    Download and run the Disable_AutoAdminLogon.reg file and it will automatically disable you connect as an administrator when you restart the system.

  • CF 9.0.1 Solr does not have the Java virtual machine path

    As part of the security of some of our machines for use of DoD, need to maintain the versions of Java.  To do this, we install the latest JDK and use the server settings > Java and JVM > Machine way Java virtual to then tell CF to use it.  We have done this since CF4 without any problems and when we moved to CF6 + we continued the process, but also after having what we then delete the folder of jre in runtime folder leave the CF is. Well I have just the program installation and installed my first CF9 + Win 2008 R2 server and after doing this the Solr service does not start.  This had me so dig in its folder structure and it has its own folder of the jre in its folder structure as well.  But using Sysinternals Process Monitor, I can see the service Solr uses NOT the folder of the jre from the inside it of own structure but is actually going up and 'try' to use the runtime\jre folder that I have deleted so it causes the service to fail.  I can actually delete the solr\jre folder as long as the runtime\jre folder exist.

    There are so many problems with this.

    • SOLR has yet another installation of Java within itself
    • SOLR does not use its own Java, even if there is a copy it
    • SOLR does not respect the setting Java VM path together

    Adobe has responded to my bug with the location of the solr configuration variable to point to the external JAVA virtual machine.

    ColdFusion9\solr\solr.lax

    Lax.nl.currentvm = JVM_PATH

    It seems to work properly until now.

  • Windows 2008 Server: unable to update the password. the value provided for the new password does not respect length, complexity, or history of the field requirements

    Unable to update the password. the value provided for the new password does not respect length, complexity, or history of the field requirements

    Hello

    I suggest you to send your request in this forum for better support.
  • Windows xp monitor does not display the background image

    My windows xp screen does not show the background image. Started when I changed the photos there twice. Now, the background image is only 1/4 of the image on the left 1/4 of the screen. The rest is white for 3/4 on the right side.

    Other images, all jpg files, are the same.

    Hi edwardo418,

    Check that your post office is set to stretch. Perform the following steps.

    1. Right-click on an empty space on the desktop.
    2. Select Properties.
    3. Select the Desktop tab
    4. Change the setting to Stretch under Position
    5. Click on apply
    6. Click OK

    Let us know if that helps.

  • Gradient does not meet the set of a live paint group

    Hi all

    I tried to fill this paint group direct (and others) with a gradient, but the gradient does not fill the entire form. It seems that the location of the gradient is confused so that it only fills in the center of the shape. I have attached a screenshot below as an example.

    Gradient Slider issues.png

    In this picture you can see that the slope is very strong in the center of the shape (highlighted in red), even if the gradient tool indicates that there should be much more widespread in the whole of the form. The degraded place sliders don't also reached lower than 13% or higher to 87% for some reason any. This has happened through the whole document and is not the first time that I had the experience.

    Any help would be greatly appreciated as it continues a major project at the mo

    Kind regards

    Elliott

    You say live paint group... If this form is perhaps made up of several areas?

    In this case: select them with the live paint Selection tool and the gradient tool to drag on all the

  • background does not properly

    I have a site I'm working on: http://matthewtbrown.com/mercerworld/mercerworld1.html

    Basically, the background does not work as it should. I want to extend across the page horizontally. It is 1 pixel wide with a white top and a blue background.

    Here is the link to the chart: http://matthewtbrown.com/mercerworld/images/background.PNG

    My code is on the scene and is:

    $('html,_body').css ({}

    "background': 'url(images/background.png) no-repeat fixed center."

    "- webkit - background-size ': 'cover."

    "- moz - background-size ': 'cover."

    "background - o - size': 'cover."

    "background-size': 'cover."

    "filter": "progid:DXImageTransform.Microsoft.AlphaImageLoader (src =" images/background.png ', sizingMethod = "scale").

    '- ms - filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader (src =" images/background.png ', sizingMethod = "scale").

    });

    Any ideas?

    Everything you need in this case is horizontal (vertical) of the upper left corner.

    For the following should do it:

    $('html,_body').css ({}

    'background': 'url(images/background.png) high horizontal left.

    });

    Darrell

  • Fixed background (resize browser so background does not move)

    Hey,.

    Im a noob to dreamweaver please bear with me while I try to explain this to you guys.

    IM designing a website and I need to keep the background image in a fixed position, so that when you resize the Explorer it doesn't move and stays in the place you want according to the homepage. For example the adobe forums who we are, when you resize the window, the background does not move, but extends to the place, letting the checkerd design where it is next to the page, except that I need that on both sides. (For example, gametrailers.com, resizing, it leaves beside the page designs.

    I can't really explain much more of that, I just need the background image to remain fixed behind the page, and I have no idea how do, not to mention that the method or style is called so I can't search for tutorials. Sorry if I used termanoligy evil or anything, really new to this.

    Thank you

    Devresse

    (For example, gametrailers.com, resizing, it leaves beside the page designs.

    This site uses the following CSS rule on the body tag

    {body
    margin: 0;
    text-align: center;
    background: #C2C4C6 url(/images/gt6background.gif) scroll Center repeat-y;
    }

    If you are not familiar with CSS, now is a good time to start learning to decipher meanings.

    You can use 'fixed' instead of 'scroll '.

  • Hover background does not properly

    I insert a different class in a paragraph. For some reason, the hover background does not appear when it is used here. It works fine apart from that. No idea why and how can I fix or bypass? Thank you


    > Join our < a href = "" javascript:; "> < span class ="linkttxt"> program sponsorship </span > < /a > and you get a free neck sock, a $24.00 value." Just register and one of your friends mention your name when they purchase one of our fine grids. Buy 2 grills, check yourself and get one in any case. < table >


    Here's the info of css, but it works very well indeed:
    }
    {.linkttxt}
    do-family: Verdana, Arial, Helvetica, without serif.
    do-size: 12px;
    make-weight: bold;
    color: #996600;
    text-decoration: none;
    }
    .linkttxt a: link {}
    color: #996600;
    ;
    text-decoration: none;
    }
    .linkttxt a: visited {}
    color: #996600;
    text-decoration: none;
    }
    .linkttxt a: hover {}
    color: #003366;
    text-decoration: none;
    background-color: #CCCC99;
    }




    Let's not your CSS.

    If it is your code-

    Join our reference
    Program
    and

    So this--

    .linkttxt a: link {}
    color: #996600;
    ;
    text-decoration: none;
    }

    (and everything else) could not apply since the .linkttxt is inside
    the tag.

    You need to do-

    Join our reference
    Program
    and

    These rules apply. Or, try this.

    {a.linkttxt:Link}
    color: #996600;
    ;
    text-decoration: none;
    }

    with this--

    Join our referral program and

    --
    Murray - ICQ 71997575
    Adobe Community Expert
    (If you * MUST * write me, don't don't LAUGH when you do!)
    ==================
    http://www.dreamweavermx-templates.com - template Triage!
    http://www.projectseven.com/go - DW FAQs, tutorials & resources
    http://www.dwfaq.com - DW FAQs, tutorials & resources
    http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
    ==================

    "blueman2" wrote in message
    News:erimji$HBK$1@forums. Macromedia.com...
    > I am insert a different class in a paragraph. For some reason, the
    > hover
    > background does not appear when it is used here. It works fine apart from
    > this. Any
    > idea why and how I can fix or bypass? Thank you
    >
    >
    > > Join our reference
    > Program
    and you get a free neck sock, a value of $24.00.
    > Just
    > Sign up and have one of your friends mention your name when buying
    > a
    > our fine grids. Buy 2 grills, check yourself and get one in any case.
    >
    >
    > Here is the info of css, but it works very well indeed:
    > }
    > .linkttxt {}
    > do-family: Verdana, Arial, Helvetica, without serif.
    > do-size: 12px;
    > make-weight: bold;
    > color: #996600;
    > text-decoration: none;
    > }
    > .linkttxt a: link {}
    > color: #996600;
    > ;
    > text-decoration: none;
    > }
    > .linkttxt a: visited {}
    > color: #996600;
    > text-decoration: none;
    > }
    > .linkttxt a: hover {}
    > color: #003366;
    > text-decoration: none;
    > background-color: #CCCC99;
    > }
    >
    >
    >
    >
    >
    >

Maybe you are looking for

  • Monitoring of temperature for free software

    Hello I have the HP TouchSmart 310-1124F office running on Windows 7 and did have PKU overheating problems. I finally understood what was wrong. The fan. The processor was 74 degrees when I played a DVD music while capturing the music with Roxio Crea

  • Sqlservr.exe nealy 300M memory at startup and growth

    The sqlserver.exe service installed with the module DSC in LV 8.6 on this computer.  Almost immediately, I noticed serious performance with PC problems.  The hard drive was too sought permanently, and memory was swallowed up even when little or nothi

  • How the can stop people in my street to connect to their computer online using my attenna high speed

    I have on my road of people using my highspeed turn to get online, l think computer isses are related to this. I called the router company xplornet told me to call proved to be a waste of time. Xplornet sold me router they installed and set up the sy

  • Need a recovery code

    My computer would restart. They say its due to a damaged Windows file. I am trying to use the recovery mode, but do not know what code to enter. Can anyone help?

  • Windows live essentials does not, various problems. Need experienced advice.

    Good then it started yesterday, I tried to connect to msn, and he says "d1d2.dll not found" or something similar to that I then uninstalled messenger and then tried to re install, he said I had to get a "platform update. my computer says that I had m