Export (0) Print
Expand All
Expand Minimize

Graphics.SetCompositingQuality method

Applies to: desktop apps only

The Graphics::SetCompositingQuality method sets the compositing quality of this Graphics object.

Syntax

Status SetCompositingQuality(
  [in]  CompositingQuality compositingQuality
);

Parameters

compositingQuality [in]

Type: CompositingQuality

Element of the CompositingQuality enumeration that specifies the compositing quality.

Return value

Type:

Type: Status

If the method succeeds, it returns Ok, which is an element of the Status enumeration.

If the method fails, it returns one of the other elements of the Status enumeration.

Examples

The following example creates a SolidBrush object based on a color that has an alpha component of 128. The code uses that brush to paint two rectangles. The first rectangle is painted with the compositing mode set to CompositingQualityHighSpeed, and the second rectangle is painted with the compositing mode set to CompositingQualityHighQuality.


VOID Example_SetCompositingQuality(HDC hdc)
{
   Graphics graphics(hdc);

   // Create a SolidBrush object with an alpha-blended color.
   SolidBrush alphaBrush(Color(180, 255, 0, 0));

   // Set the compositing mode to CompositingQualityHighSpeed, 
   // and fill a rectangle.
   graphics.SetCompositingQuality(CompositingQualityHighSpeed);
   graphics.FillRectangle(&alphaBrush, 0, 0, 100, 100);

   // Set the compositing mode to CompositingQualityHighQuality, 
   // and fill a rectangle.
   graphics.SetCompositingQuality(CompositingQualityHighQuality);
   graphics.FillRectangle(&alphaBrush, 100, 0, 100, 100);
}

Requirements

Minimum supported client

Windows XP, Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Product

GDI+ 1.0

Header

Gdiplusgraphics.h (include Gdiplus.h)

Library

Gdiplus.lib

DLL

Gdiplus.dll

See also

Graphics
Graphics::GetCompositingMode
Graphics::GetCompositingQuality
HatchBrush
SolidBrush
Graphics::SetCompositingMode
Alpha Blending Lines and Fills
New Features

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show:
© 2015 Microsoft