Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / November 2003

Tip: Looking for answers? Try searching our database.

SetStretchBltMode() equivalent in Java?

Thread view: 
Swengtoo - 27 Oct 2003 22:51 GMT
Is there in Java an equivalent to the Windows GDI function
SetStretchBltMode()?

I am already familiar with the drawImage() method of the Graphics
class. I successfully load and display an image using this method, but
I would like to be able to modify the default stretching mode of
drawImage(). More specifically, I am looking for the equivalent of
STRETCH_ORSCANS:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_6cth.asp

Any clues, hints or pointers would be highly appreciated.

TIA,
Swengtoo
Thomas Weidenfeller - 28 Oct 2003 09:35 GMT
> Is there in Java an equivalent to the Windows GDI function
> SetStretchBltMode()?

Set a RenderingHint (there aren't too many regarding interpolation),
and try if your system adhears to the hint.

/Thomas
Swengtoo - 30 Oct 2003 16:27 GMT
> > Is there in Java an equivalent to the Windows GDI function
> > SetStretchBltMode()?
>
> Set a RenderingHint (there aren't too many regarding interpolation),
> and try if your system adhears to the hint.

Thomas, thank you very much. I tried VALUE_INTERPOLATION_BICUBIC,
VALUE_INTERPOLATION_BILINEAR and VALUE_INTERPOLATION_NEAREST_NEIGHBOR,
but they don't give me what I need (STRETCH_ORSCANS).

It seems that I need to define my own rendering hint. Unfortunately, I
couldn't find much information about how this feature work. I read the
following:

http://java.sun.com/products/jdk/1.2/docs/guide/2d/spec/j2d-awt.fm3.html#65412
http://java.sun.com/j2se/1.4.2/docs/api/java/awt/RenderingHints.html
http://java.sun.com/docs/books/tutorial/2d/display/quality.html

But this a far cry from the depth of information I need about this
feature. Any idea where I can find more material about this? (web URLs
would be super!)

Thanks,
Swengtoo
ak - 05 Nov 2003 08:32 GMT
Can you tell me why you need this function?

> > > Is there in Java an equivalent to the Windows GDI function
> > > SetStretchBltMode()?
[quoted text clipped - 9 lines]
> couldn't find much information about how this feature work. I read the
> following:

http://java.sun.com/products/jdk/1.2/docs/guide/2d/spec/j2d-awt.fm3.html#654
12
> http://java.sun.com/j2se/1.4.2/docs/api/java/awt/RenderingHints.html
> http://java.sun.com/docs/books/tutorial/2d/display/quality.html
[quoted text clipped - 5 lines]
> Thanks,
> Swengtoo


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.