5 Replies Latest reply: May 27, 2009 9:04 PM by 843851 RSS

    HMatte - HFlatMatte - HImageEffectMatte - etc

      Hello all,

      I want to display an image in an xlet, that gradually disappears (e.g. like a fade-out, disappear line per line,...). My only two leads here are http://www.mhp-interactive.org/tutorial/mhp/video-graphics-integration.shtml (two thumbs up for the tutorial by the way) and http://www.itl.nist.gov/div895/cmr/dase/apps/stockticker.html (where some xlet supposedly uses the setMatte function to render some text to 40% opacity - although the screenshot at the top of the page just shows a 100% opacity blue text on white background).

      You've guessed it by now: I'm stuck. I first tried something on the Philips SilverBox: it did not work, and no error appeared. I then tried it on the Philips DSR5600, and there it generated an error (with HMatteException message being "null" - what a great help!). I do not seem to understand how this Matte-stuff ought to be used to get any results.

      Is there anyone out there who tried and/or succeeded using setMatte(...). If the whole idea of using Matte for this thing seems awkward to any of you, you may always point out the better thing to use.

        • 1. Re: HMatte - HFlatMatte - HImageEffectMatte - etc
          You can do this using the org.dvb.ui.DVBAlphaComposite class as analternative to using the HAVi APIs. If you get the graphics context that you're drawing into, and cast it to an org.dvb.ui.DVBGraphics object (every instance of java.awt.Graphics returned by an MHP implementation is a DVBGraphics object) you can set the alpha level this way.

          Alternatively, in some scenarios the org.dvb.DVBColor class may help you, since that allows you to set alpha values for each color. One gotcha with both of these is that not all alpha values have to be supported - only fully opaque, 50% transparent and 100% transparent have to be supported, according ot the MHP spec.

          Sory I can't be more help than that at the moment, but hopefully this will prove useful.


          (and thank for the comments about www.mhp-interactive.org, by the way!)
          • 2. Re: HMatte - HFlatMatte - HImageEffectMatte - etc
            I got confirmation from Philips that HMatte is not supported on the STB DSR 5600.


            • 3. Re: HMatte - HFlatMatte - HImageEffectMatte - etc
              The Philips DSR5600 has a little MHP logo. According to http://www.mhp.org/products/index.html only those products that pass the MHP Test Suite may use the MHP logo.

              Does this mean HMatte is not a mandatory part of the MHP specification?!?
              • 4. Re: HMatte - HFlatMatte - HImageEffectMatte - etc
                Correct. HMatte is optional in MHP. Section G.7 says "Platforms are not required to implement the functionality of mattes in HAVi.Non- implementation should be implemented as specified by HAVi."

                • 5. Re: HMatte - HFlatMatte - HImageEffectMatte - etc

                  Can anyone give an example code to use HImageEffectMatte ... it will really be helpful in developing more applications. I tried searching but failed to find any sample code ...

                  Thank you