image.html.svn-base
来自「j2me设计的界面包」· SVN-BASE 代码 · 共 747 行 · 第 1/3 页
SVN-BASE
747 行
<BR>
<B>Deprecated.</B> <I>scale should return an image rather than modify the image in place use scaled(int, int) instead</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Image.html#scaled(int, int)">scaled</A></B>(int width,
int height)</CODE>
<BR>
Returns a scaled version of this image image using the given width and height, this is a fast algorithm that preserves transulcent information</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Image.html#scaledHeight(int)">scaledHeight</A></B>(int height)</CODE>
<BR>
Scales the image to the given height while updating the width based on the aspect ratio of the height</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Image.html#scaledSmallerRatio(int, int)">scaledSmallerRatio</A></B>(int width,
int height)</CODE>
<BR>
Scales the image while mainting the aspect ratio to the smaller size image</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Image.html#scaledWidth(int)">scaledWidth</A></B>(int width)</CODE>
<BR>
Scales the image to the given width while updating the height based on the aspect ratio of the width</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Image.html#subImage(int, int, int, int, boolean)">subImage</A></B>(int x,
int y,
int width,
int height,
boolean processAlpha)</CODE>
<BR>
Extracts a subimage from the given image allowing us to breakdown a single large image into multiple smaller images in RAM, this actually creates a standalone version of the image for use.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Image.html#toRGB(com.sun.lwuit.RGBImage, int, int, int, int, int, int)">toRGB</A></B>(<A HREF="../../../com/sun/lwuit/RGBImage.html" title="class in com.sun.lwuit">RGBImage</A> image,
int destX,
int destY,
int x,
int y,
int width,
int height)</CODE>
<BR>
Extracts data from this image into the given RGBImage</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="subImage(int, int, int, int, boolean)"><!-- --></A><H3>
subImage</H3>
<PRE>
public <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A> <B>subImage</B>(int x,
int y,
int width,
int height,
boolean processAlpha)</PRE>
<DL>
<DD>Extracts a subimage from the given image allowing us to breakdown a single large image into multiple smaller images in RAM, this actually creates a standalone version of the image for use.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>width</CODE> - the width of internal images<DD><CODE>height</CODE> - the height of internal images
<DT><B>Returns:</B><DD>An array of all the possible images that can be created from the source
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="rotate(int)"><!-- --></A><H3>
rotate</H3>
<PRE>
public <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A> <B>rotate</B>(int degrees)</PRE>
<DL>
<DD>Returns an instance of this image rotated by the given number of degrees. By default 90 degree angle divisions are supported, anything else is implementation dependent. This method assumes a square image.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>degrees</CODE> - A degree in right angle must be larer than 0 and up to 359 degrees
<DT><B>Returns:</B><DD>new image instance with the closest possible rotation</DL>
</DD>
</DL>
<HR>
<A NAME="modifyAlpha(byte)"><!-- --></A><H3>
modifyAlpha</H3>
<PRE>
public <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A> <B>modifyAlpha</B>(byte alpha)</PRE>
<DL>
<DD>Creates a new image instance with the alpha channel of opaque/translucent pixels within the image using the new alpha value. Transparent (alpha == 0) pixels remain transparent. All other pixels will have the new alpha value.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>alpha</CODE> - New value for the entire alpha channel
<DT><B>Returns:</B><DD>Translucent/Opaque image based on the alpha value and the pixels of this image</DL>
</DD>
</DL>
<HR>
<A NAME="mirror()"><!-- --></A><H3>
mirror</H3>
<PRE>
public <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A> <B>mirror</B>()</PRE>
<DL>
<DD><B>Deprecated.</B> <I>this method is no longer supported due to issues when mixing it with other methods such as rotate. Future versions of the API will provide an alternative</I>
<P>
<DD>Returns a mirror instance of this image
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a mirror instance of this image</DL>
</DD>
</DL>
<HR>
<A NAME="extractTranslucentMask()"><!-- --></A><H3>
extractTranslucentMask</H3>
<PRE>
public <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A> <B>extractTranslucentMask</B>()</PRE>
<DL>
<DD><B>Deprecated.</B> <I>translucency masks are no longer supported or necessary, use resources for portability and unification</I>
<P>
<DD>Converts a newly loaded masked image into a translucent image. A masked image is an image file of even height that is two separate opaque images the top part is the actual image containing the opaque content. The bottom part is a mask that would be ovelayed as the alpha channel of the top part of the image. The red channel of the bottom part would just be assigned to the alpha portion of the top part thus allowing an image to contain translucency while being portable to different devices.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>Translucent image instance</DL>
</DD>
</DL>
<HR>
<A NAME="createImage(java.lang.String)"><!-- --></A><H3>
createImage</H3>
<PRE>
public static <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A> <B>createImage</B>(java.lang.String path)
throws java.io.IOException</PRE>
<DL>
<DD>creates an image from the given path
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>path</CODE> -
<DT><B>Returns:</B><DD>newly created image object
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="createImage(java.io.InputStream)"><!-- --></A><H3>
createImage</H3>
<PRE>
public static <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A> <B>createImage</B>(java.io.InputStream stream)
throws java.io.IOException</PRE>
<DL>
<DD>creates an image from an InputStream
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>stream</CODE> - a given InputStream
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="createImage(int[], int, int)"><!-- --></A><H3>
createImage</H3>
<PRE>
public static <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A> <B>createImage</B>(int[] rgb,
int width,
int height)</PRE>
<DL>
<DD>creates an image from an RGB image
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>rgb</CODE> - the RGB image array data<DD><CODE>width</CODE> - the image width<DD><CODE>height</CODE> - the image height
<DT><B>Returns:</B><DD>an image from an RGB image</DL>
</DD>
</DL>
<HR>
<A NAME="createImage(int, int)"><!-- --></A><H3>
createImage</H3>
<PRE>
public static <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A> <B>createImage</B>(int width,
int height)</PRE>
<DL>
<DD>creates and buffered Image
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>width</CODE> - the image width<DD><CODE>height</CODE> - the image height
<DT><B>Returns:</B><DD>an image in a given width and height dimension</DL>
</DD>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?