graphics.html.svn-base

来自「j2me设计的界面包」· SVN-BASE 代码 · 共 932 行 · 第 1/3 页

SVN-BASE
932
字号
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Graphics.html#getClipHeight()">getClipHeight</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the clip height</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Graphics.html#getClipWidth()">getClipWidth</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the clip width</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Graphics.html#getClipX()">getClipX</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the x clipping position</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Graphics.html#getClipY()">getClipY</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the y clipping position</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Graphics.html#getColor()">getColor</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current color</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../com/sun/lwuit/Font.html" title="class in com.sun.lwuit">Font</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Graphics.html#getFont()">getFont</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the font used with the drawString method calls</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Graphics.html#getTranslateX()">getTranslateX</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current x translate value</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Graphics.html#getTranslateY()">getTranslateY</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current y translate value</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Graphics.html#setClip(int, int, int, int)">setClip</A></B>(int&nbsp;x,
        int&nbsp;y,
        int&nbsp;width,
        int&nbsp;height)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Updates the clipping region to match the given region exactly</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Graphics.html#setColor(int)">setColor</A></B>(int&nbsp;RGB)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the current rgb color while ignoring any potential alpha component within said color value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Graphics.html#setFont(com.sun.lwuit.Font)">setFont</A></B>(<A HREF="../../../com/sun/lwuit/Font.html" title="class in com.sun.lwuit">Font</A>&nbsp;font)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the font to use with the drawString method calls</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/Graphics.html#translate(int, int)">translate</A></B>(int&nbsp;x,
          int&nbsp;y)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Translates the X/Y location for drawing on the underlying surface.</TD>
</TR>
</TABLE>
&nbsp;<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>
&nbsp;
<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="translate(int, int)"><!-- --></A><H3>
translate</H3>
<PRE>
public void <B>translate</B>(int&nbsp;x,
                      int&nbsp;y)</PRE>
<DL>
<DD>Translates the X/Y location for drawing on the underlying surface. Translation is incremental so the new value will be added to the current translation and in order to reset translation we have to invoke  <code>translate(-getTranslateX(), -getTranslateY()) </code>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - the x coordinate<DD><CODE>y</CODE> - the y coordinate</DL>
</DD>
</DL>
<HR>

<A NAME="getTranslateX()"><!-- --></A><H3>
getTranslateX</H3>
<PRE>
public int <B>getTranslateX</B>()</PRE>
<DL>
<DD>Returns the current x translate value
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the current x translate value</DL>
</DD>
</DL>
<HR>

<A NAME="getTranslateY()"><!-- --></A><H3>
getTranslateY</H3>
<PRE>
public int <B>getTranslateY</B>()</PRE>
<DL>
<DD>Returns the current y translate value
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the current y translate value</DL>
</DD>
</DL>
<HR>

<A NAME="getColor()"><!-- --></A><H3>
getColor</H3>
<PRE>
public int <B>getColor</B>()</PRE>
<DL>
<DD>Returns the current color
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the RGB graphics color</DL>
</DD>
</DL>
<HR>

<A NAME="setColor(int)"><!-- --></A><H3>
setColor</H3>
<PRE>
public void <B>setColor</B>(int&nbsp;RGB)</PRE>
<DL>
<DD>Sets the current rgb color while ignoring any potential alpha component within said color value.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>RGB</CODE> - the RGB value for the color.</DL>
</DD>
</DL>
<HR>

<A NAME="getFont()"><!-- --></A><H3>
getFont</H3>
<PRE>
public <A HREF="../../../com/sun/lwuit/Font.html" title="class in com.sun.lwuit">Font</A> <B>getFont</B>()</PRE>
<DL>
<DD>Returns the font used with the drawString method calls
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the font used with the drawString method calls</DL>
</DD>
</DL>
<HR>

<A NAME="setFont(com.sun.lwuit.Font)"><!-- --></A><H3>
setFont</H3>
<PRE>
public void <B>setFont</B>(<A HREF="../../../com/sun/lwuit/Font.html" title="class in com.sun.lwuit">Font</A>&nbsp;font)</PRE>
<DL>
<DD>Sets the font to use with the drawString method calls
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>font</CODE> - the font used with the drawString method calls</DL>
</DD>
</DL>
<HR>

<A NAME="getClipX()"><!-- --></A><H3>
getClipX</H3>
<PRE>
public int <B>getClipX</B>()</PRE>
<DL>
<DD>Returns the x clipping position
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the x clipping position</DL>
</DD>
</DL>
<HR>

<A NAME="getClipY()"><!-- --></A><H3>
getClipY</H3>
<PRE>
public int <B>getClipY</B>()</PRE>
<DL>
<DD>Returns the y clipping position
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the y clipping position</DL>
</DD>
</DL>
<HR>

<A NAME="getClipWidth()"><!-- --></A><H3>
getClipWidth</H3>
<PRE>
public int <B>getClipWidth</B>()</PRE>
<DL>
<DD>Returns the clip width
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the clip width</DL>
</DD>
</DL>
<HR>

<A NAME="getClipHeight()"><!-- --></A><H3>
getClipHeight</H3>
<PRE>
public int <B>getClipHeight</B>()</PRE>
<DL>
<DD>Returns the clip height
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the clip height</DL>
</DD>
</DL>
<HR>

<A NAME="clipRect(int, int, int, int)"><!-- --></A><H3>
clipRect</H3>
<PRE>
public void <B>clipRect</B>(int&nbsp;x,
                     int&nbsp;y,
                     int&nbsp;width,
                     int&nbsp;height)</PRE>
<DL>
<DD>Clips the given rectangle by intersecting with the current clipping region, this method can thus only shrink the clipping region and never increase it.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - the x coordinate of the rectangle to intersect the clip with<DD><CODE>y</CODE> - the y coordinate of the rectangle to intersect the clip with<DD><CODE>width</CODE> - the width of the rectangle to intersect the clip with<DD><CODE>height</CODE> - the height of the rectangle to intersect the clip with</DL>
</DD>
</DL>
<HR>

<A NAME="setClip(int, int, int, int)"><!-- --></A><H3>
setClip</H3>
<PRE>
public void <B>setClip</B>(int&nbsp;x,
                    int&nbsp;y,
                    int&nbsp;width,
                    int&nbsp;height)</PRE>
<DL>
<DD>Updates the clipping region to match the given region exactly
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - the x coordinate of the new clip rectangle.<DD><CODE>y</CODE> - the y coordinate of the new clip rectangle.<DD><CODE>width</CODE> - the width of the new clip rectangle.<DD><CODE>height</CODE> - the height of the new clip rectangle.</DL>
</DD>
</DL>
<HR>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?