Graphics

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/39

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 12:20 AM on 8/8/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

40 Terms

1
New cards

Graphics

A class in the System.Drawing namespace that represents a drawing surface and provides methods for drawing shapes, text, and images. Domain: C# → .NET → System.Drawing → 2D Drawing & Rendering

2
New cards

Graphics g = Graphics.FromImage(bitmap);

Creates a Graphics object that can be used to draw onto an existing Image or Bitmap.

3
New cards

using Graphics g = Graphics.FromImage(bitmap);

Creates a Graphics object for an image and automatically disposes it when execution leaves its scope.

4
New cards

g.DrawLine(pen, x1, y1, x2, y2);

Draws a line between two specified coordinate points using a Pen.

5
New cards

g.DrawLines(pen, points);

Draws a sequence of connected line segments through an array of points using a Pen.

6
New cards

g.DrawRectangle(pen, x, y, width, height);

Draws the outline of a rectangle using the specified Pen, position, width, and height.

7
New cards

g.FillRectangle(brush, x, y, width, height);

Fills the interior of a rectangle using the specified Brush.

8
New cards

g.DrawEllipse(pen, x, y, width, height);

Draws the outline of an ellipse inside the specified bounding rectangle. Equal width and height produce a circle.

9
New cards

g.FillEllipse(brush, x, y, width, height);

Fills the interior of an ellipse using the specified Brush.

10
New cards

g.DrawPolygon(pen, points);

Draws the outline of a polygon defined by an array of points.

11
New cards

g.FillPolygon(brush, points);

Fills the interior of a polygon defined by an array of points.

12
New cards

g.DrawArc(pen, rectangle, startAngle, sweepAngle);

Draws a portion of an ellipse defined by a bounding rectangle, starting angle, and sweep angle.

13
New cards

g.DrawPie(pen, rectangle, startAngle, sweepAngle);

Draws the outline of a pie-shaped section defined by an elliptical arc and lines connecting the arc to its center.

14
New cards

g.FillPie(brush, rectangle, startAngle, sweepAngle);

Fills the interior of a pie-shaped section using the specified Brush.

15
New cards

g.DrawCurve(pen, points);

Draws a smooth curve through an array of specified points.

16
New cards

g.DrawBezier(pen, p1, p2, p3, p4);

Draws a cubic Bézier curve using two endpoint coordinates and two control points.

17
New cards

g.DrawString("Hello", font, brush, x, y);

Draws text at the specified position using a Font to control typography and a Brush to control how the text is filled.

18
New cards

SizeF size = g.MeasureString("Hello", font);

Measures the approximate dimensions required to draw the specified text using a particular Font.

19
New cards

g.DrawImage(image, x, y);

Draws an image at the specified coordinates.

20
New cards

g.DrawImage(image, x, y, width, height);

Draws an image at the specified coordinates and scales it to the specified width and height.

21
New cards

g.DrawImageUnscaled(image, x, y);

Draws an image at its original pixel dimensions without scaling it.

22
New cards

g.Clear(Color.White);

Clears the entire drawing surface and fills it with the specified Color.

23
New cards

g.TranslateTransform(x, y);

Translates the Graphics coordinate system by the specified horizontal and vertical amounts.

24
New cards

g.RotateTransform(angle);

Rotates the Graphics coordinate system by the specified angle in degrees.

25
New cards

g.ScaleTransform(scaleX, scaleY);

Scales the Graphics coordinate system by the specified horizontal and vertical scale factors.

26
New cards

g.ResetTransform();

Resets the Graphics transformation matrix to the identity transformation.

27
New cards

g.SmoothingMode = SmoothingMode.AntiAlias;

Enables anti-aliased rendering for supported lines, curves, and shape edges to make them appear smoother.

28
New cards

g.InterpolationMode = InterpolationMode.HighQualityBicubic;

Sets a high-quality bicubic interpolation mode used when images are scaled or transformed.

29
New cards

g.TextRenderingHint = TextRenderingHint.AntiAlias;

Sets the text-rendering behavior to use anti-aliasing for smoother text edges.

30
New cards

g.PixelOffsetMode = PixelOffsetMode.HighQuality;

Sets high-quality pixel-offset behavior used during rendering.

31
New cards

g.SetClip(rectangle);

Restricts subsequent drawing operations to the specified clipping region.

32
New cards

g.ResetClip();

Resets the clipping region so drawing is no longer restricted by the previously specified custom clip.

33
New cards

GraphicsState state = g.Save();

Saves the current Graphics state, including transformations and clipping information, so it can later be restored.

34
New cards

g.Restore(state);

Restores a Graphics object to a state that was previously saved with Save().

35
New cards

g.Dispose();

Releases resources associated with the Graphics object.

36
New cards

Drawing Surface

The destination onto which a Graphics object renders shapes, text, and images, such as a Bitmap or another supported graphics surface.

37
New cards

Pen

An object used by Graphics drawing methods to define how lines and shape outlines are rendered, including properties such as color and width.

38
New cards

Brush

An object used to define how the interiors of shapes and text are filled when rendered by Graphics.

39
New cards

Graphics Transformation

A modification of the Graphics coordinate system that changes how subsequently drawn objects are positioned, rotated, or scaled.

40
New cards

Anti-Aliasing

A rendering technique that reduces jagged-looking edges by blending pixels around the boundaries of lines, curves, shapes, or text.