{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

exam2WinProg - Chapter2Forms: DrawingtotheScreen Drawing to...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 2 – Forms: Form Transparency - Nonrectangular Forms Chapter 5 - Drawing Basics Drawing to the Screen Drawing to the screen CreateGraphics is used for measurements, do not draw with it Handle all painting in Paint handler, so OS paint requests are handled Don't call Paint, call Invalidate Enumerations GetNames GetValues Parse Colors Color struct FromArgb, FromKnownColor, FromName, ToArgb, ToKnownColor static fields for colors with names: Blue, Green, etc. KnownColor enum names of colors: Blue, Green, etc. names system colors: ActiveCaption, ActiveBorder, etc. SystemColors sealed class static colors for system colors don't dispose them ColorTranslator class FromHtml, ToHtml Brushes SolidBrush TextureBrush HatchBrush, HatchStyle LinearGradientBrush PathGradientBrush Pens Pen sealed class IDisposable width 0 Pen(brush), Pen(color), Pen(color, width) Pen.Blue, SystemPens Custom Pan pen.DashStyle = DashStyle.Custom pen.DashPattern = new float [] { 1f, 1f, 1f, 2f, 1f, 3f, 1f, 4f, 1f } values are in widths of the pen Compound Pen pen.CompoundArray = new float [] { 0.0f, 0.25f, 0.45f, 0.55f, 0.75f, 1f } values are percentages of the width of the pen Pen Alignment
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
only center and inset are supported compound pens only support inset Shapes Draw methods use a pen Fill methods use a brush Restore graphics Closed Paths Disable Validating Manual Location for Initial Position Paths StartFigure CloseFigure Fill Modes and Winding number Images Loading and Drawing Images: scale, clip, skew Rotating and flipping drawn images Changing color in drawn images Transparent color is usually in lower left corner bmp.MakeTransparent
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern