gdi programming with c sharp phần 5 pdf
... TranslateClip to translate a region // Create a Graphics object Graphics g = this.CreateGraphics(); g.Clear(this.BackColor); // Create a RectangleF rectangle RectangleF rect1 = new RectangleF(20.0f, ... item click event handlers private void CircleMenu_Click(object sender, System.EventArgs e) { // Create a rectangle Rectangle rect = new Rectangle (50 , 0, 300, 300); // Create a Shape obj...
Ngày tải lên: 12/08/2014, 19:20
... graphics items. Listing 11. 25 contains two methods. The PrintGraphicsItems_Click method is a menu click event handler that creates a PrintDocument object, sets its PrintPage event, and calls ... HatchBrush(HatchStyle.Cross, Color.Red, Color.Yellow); // Create a Bitmap object Bitmap curBitmap = new Bitmap(200, 200); // Create a Graphics object from Bitmap Graphics g = Graphics.FromImag...
Ngày tải lên: 12/08/2014, 19:20
... Application SUMMARY Chapter 5. Colors, Fonts, and Text Section 5. 1. Accessing the Graphics Object Section 5. 2. Working with Colors Section 5. 3. Working with Fonts Section 5. 4. ... the device context (HDC), which is used by GDI to send information to the device. In GDI+ , the concept of device context and handle to the device context is replaced by the Graphics o...
Ngày tải lên: 12/08/2014, 19:20
gdi programming with c sharp phần 2 ppt
... rectangle. Intersect Replaces a rectangle with the intersection of itself and another rectangle. IntersectsWith Determines if a specified rectangle intersects with rect. Offset Adjusts the location of a specified ... was clicked. Now we check to see if the Rectangle check box is checked. If so, we draw a rectangle to mark the connecting point of the two lines. If not, we draw an ellipse...
Ngày tải lên: 12/08/2014, 19:20
gdi programming with c sharp phần 3 docx
... (rect, startColor, endColor, mode); } // Gamma correction check box is checked if(checkBox1.Checked) { lgBrush.GammaCorrection = true; } // Fill rectangle g.FillRectangle(lgBrush, rect); ... curGraphics.DrawRectangle(curPen, curX, curY, diffX, diffY); break; } case 4: { // Fill the rectangle curGraphics.FillRectangle(curBrush, curX, curY, diffX, diffY); break; } case 5:...
Ngày tải lên: 12/08/2014, 19:20
gdi programming with c sharp phần 4 pptx
... text color AppWorkspace Multiple-document interface (MDI) workspace background color Control Control background color ControlDark 3D control shadow color ControlDarkDark 3D control dark shadow color ControlLight 3D ... active caption, and control dark system colors, respectively. textBox1.BackColor = SystemColors.InactiveBorder; radioButton1.BackColor = SystemColors.ActiveCaption; button1.Bac...
Ngày tải lên: 12/08/2014, 19:20
gdi programming with c sharp phần 6 potx
... e) { // Create a Graphics object Graphics g = this.CreateGraphics(); g.Clear(this.BackColor); // Create two colors Color lClr = Color.FromArgb(2 45, 0,0); Color uClr = Color.FromArgb( 255 ,0,0); ... colorMap1.OldColor = Color.Red; colorMap1.NewColor = Color.Green; colorMap2.OldColor = Color.Yellow; colorMap2.NewColor = Color.Navy; colorMap3.OldColor = Color.Blue; colorMap3.NewColo...
Ngày tải lên: 12/08/2014, 19:20
gdi programming with c sharp phần 7 potx
... g.DrawLine(totTransPen, 10, 50 , 200, 50 ); g.FillRectangle(new SolidBrush( Color.FromArgb(140, 0, 0, 255 )), rect); rect.Y += 60; g.FillEllipse(new SolidBrush( Color.FromArgb( 150 , 255 , 255 , 255 )), rect); SolidBrush ... void GammaCorrectionMenu_Click( object sender, System.EventArgs e) { Graphics g = this.CreateGraphics(); g.Clear(this.BackColor); // Create a rectangle Recta...
Ngày tải lên: 12/08/2014, 19:20
gdi programming with c sharp phần 8 ppsx
... e) { // Create a Graphics object Graphics g = this.CreateGraphics(); g.Clear(this.BackColor); // Create a rectangle Rectangle rect = new Rectangle(20, 20, 100, 100); // Create a solid brush ... objects. Listing 10.18 Using ColorMatrix to translate colors private void TranslationMenu_Click(object sender, System.EventArgs e) { // Create a Graphics object Graphics g = this.CreateGraph...
Ngày tải lên: 12/08/2014, 19:20
gdi programming with c sharp phần 10 ppsx
... bl=bl+ 25; if (gr+ 25& lt; 255 ) gr=gr+ 25; if (re+ 25& lt; 255 ) re=re+ 25; if (x1- 25& gt;0) x1=x1- 25; if (y1- 25& gt;0) y1=y1- 25; This document was created by an unregistered ChmMagic, please go to ... properties: ClipRectangle and Graphics.ClipRectangle indicates the rectangle in which to paint, and the Graphics property indicates the Graphics object associated with the p...
Ngày tải lên: 12/08/2014, 19:20