Share via


CDrawingManager Class

The CDrawingManager class implements complex drawing algorithms.

class CDrawingManager : public CObject

Members

Public Constructors

Name

Description

CDrawingManager::CDrawingManager

Constructs a CDrawingManager object.

CDrawingManager::~CDrawingManager

Destructor.

Public Methods

Name

Description

CDrawingManager::CreateBitmap_32

Creates a 32-bit device-independent bitmap (DIB) that applications can write to directly.

CDrawingManager::DrawAlpha

Displays bitmaps that have transparent or semitransparent pixels.

CDrawingManager::DrawEllipse

Draws an ellipse with the supplied fill and border colors.

CDrawingManager::DrawGradientRing

Draws a ring and fills it with a color gradient.

CDrawingManager::DrawLine, CDrawingManager::DrawLineA

Draws a line.

CDrawingManager::DrawRect

Draws a rectangle with the supplied fill and border colors.

CDrawingManager::DrawShadow

Draws a shadow for a rectangular area.

CDrawingManager::Fill4ColorsGradient

Fills a rectangular area with two color gradients.

CDrawingManager::FillGradient

Fills a rectangular area with a specified color gradient.

CDrawingManager::FillGradient2

Fills a rectangular area with a specified color gradient. The direction of the gradient's color change is also specified.

CDrawingManager::GrayRect

Fills a rectangle with a specified gray color.

CDrawingManager::HighlightRect

Highlights a rectangular area.

CDrawingManager::HLStoRGB_ONE

Converts a color from a HLS representation to a RGB representation.

CDrawingManager::HLStoRGB_TWO

Converts a color from a HLS representation to a RGB representation.

CDrawingManager::HSVtoRGB

Converts a color from a HSV representation to a RGB representation.

CDrawingManager::HuetoRGB

Helper method that converts a hue value to a red, green, or blue component.

CDrawingManager::MirrorRect

Flips a rectangular area.

CDrawingManager::PixelAlpha

Helper method that determines the final color for a semitransparent pixel.

CDrawingManager::PrepareShadowMask

Creates a bitmap that can be used as a shadow.

CDrawingManager::RGBtoHSL

Converts a color from a RGB representation to a HSL representation.

CDrawingManager::RGBtoHSV

Converts a color from a RGB representation to a HSV representation.

CDrawingManager::SetAlphaPixel

Helper method that colors a partially transparent pixel in a bitmap.

CDrawingManager::SetPixel

Helper method that changes a single pixel in a bitmap to the specified color.

CDrawingManager::SmartMixColors

Combines two colors based on a weighted ratio.

Remarks

The CDrawingManager class provides functions for drawing shadows, color gradients, and highlighted rectangles. It also performs alpha-blending. You can use this class to directly change your application's UI.

Inheritance Hierarchy

CObject

   CDrawingManager

Requirements

Header: afxdrawmanager.h

See Also

Concepts

MFC Hierarchy Chart

Other Resources

Classes (MFC Feature Pack)