Skip to main content

DVBBufferedImage

2 replies [Last post]
terymas
Offline
Joined: 2007-09-03

Hi All,

I could read here :
http://wiki.java.net/bin/view/Mobileandembedded/BDJImageMemoryManagement

"Use DVBBufferedImage instead of AWT's BufferedImage, so you can call dispose() on it when you're done"

But I don't find exactly how to use it...
DVBBufferedImage.createGraphics() return DVBGraphics
DVBBufferedImage.getGraphics() return Graphics not a 2DGraphics

I searh in the hdcookbook project :
"In the HD Cookbook menu application, we use DVBBufferedImage in this way. See AssetFinder in com.hdcookbook.util and MenuAssetFinder in com.hdcookbook.bookmenu.menu.MenuAssetFinder to see how this is done."

But I don't find...

Who can help me ?
Thanks,

Terry

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
terymas
Offline
Joined: 2007-09-03

Perfect !

Thank you Bill,
Terry

Bill Foote

bd-j-dev@mobileandembedded.org wrote:
> Hi All,
>
> I could read here :
> http://wiki.java.net/bin/view/Mobileandembedded/BDJImageMemoryManagement
>
> "Use DVBBufferedImage instead of AWT's BufferedImage, so you can call dispose() on it when you're done"
>
> But I don't find exactly how to use it...
> DVBBufferedImage.createGraphics() return DVBGraphics
> DVBBufferedImage.getGraphics() return Graphics not a 2DGraphics

Just cast it to Graphics2D. There's a normative requirement (buried
in the MHP spec) that every instance of DVBGraphics be an instanceof
Graphics2D.

Thanks for pointing this out - I'll update the wiki!

> I searh in the hdcookbook project :
> "In the HD Cookbook menu application, we use DVBBufferedImage in this way. See AssetFinder in com.hdcookbook.util and MenuAssetFinder in com.hdcookbook.bookmenu.menu.MenuAssetFinder to see how this is done."
>
> But I don't find...

Download the latest version...

billf@~/java.net/hdcookbook$ !gr
grep -l DVBBufferedImage `find . -name '*.java' -print`
./grin/library/src/com/hdcookbook/grin/util/AssetFinder.java
./grin/samples/GrinDriverXlet/GrinDriverXlet.java
./grin/samples/HelloGrinWorld/HelloGrinWorld.java
./grin/xlets/bookmenu/src/com/hdcookbook/bookmenu/menu/MenuAssetFinder.java
./grin/xlets/gunbunny/src/com/hdcookbook/gunbunny/Animator.java
./grin/xlets/gunbunny/src/com/hdcookbook/gunbunny/DirectDrawAnimator.java
./grin/xlets/gunbunny/src/com/hdcookbook/gunbunny/ImageSprite.java
./grin/xlets/gunbunny/src/com/hdcookbook/gunbunny/RepaintDrawAnimator.java
./grin/xlets/gunbunny/src/com/hdcookbook/gunbunny/SFAAAnimator.java
./grin/xlets/gunbunny/src/com/hdcookbook/gunbunny/TextSprite.java

Cheers,

Bill

> Who can help me ?
> Thanks,
>
> Terry
> [Message sent by forum member 'terymas' (terymas)]
>
> http://forums.java.net/jive/thread.jspa?messageID=282279
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
> For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net