📄 slide023.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="blendTrans(Duration=2)" http-equiv="Page-Enter">
<title>Big C++: Chptr. 27 -- Graphical User Interfaces</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Copyright" content="2005 John Wiley & Sons">
<meta name="Author" content="Kurt Schmidt">
</head>
<body>
<div onclick="document.location='slide024.html'">
<h2><font color='#009999'>27.7 Painting (cont.)</font></h2>
<ul>
<li><font size="+1">The paint function obtains a <i>device context</i>, which
is an object that represents the surface of the window.</font></li>
<li><font size="+1">The device context class has drawing functions such as <tt>DrawLine</tt>,
<tt>DrawEllipse</tt>, and <tt>DrawText</tt>.
<blockquote>
<pre>void EllipseWindow::OnPaint(wxPaintEvent& event)
{
wxPaintDC dc(this);
dc.SetBrush(*wxTRANSPARENT_BRUSH);
wxSize size = GetSize();
int x = 0;
int y = 0;
int width = size.GetWidth();
int height = size.GetHeight();
dc.DrawEllipse(x, y, width, height);
}</pre>
</blockquote></font></li>
</ul>
<hr>
<center><small>
<a href='slide022.html'>prev</a>
|<a href='slide001.html'>top</a>
|<a href='slide024.html'>next</a>
</small></center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -