Extfloodfill can fill irregular areas

Source: Internet
Author: User

Extfloodfill Function

TheExtfloodfillFunction fills an area of the display surface with the current brush.

Syntax

C ++

 

Bool extfloodfill (

_ In _ HDC,

_ In _ int nxstart,

_ In _ int nystart,

_ In _ colorref crcolor,

_ In _ uint fufilltype

);

 

Parameters

HDC[In]

A handle to a device context.

Nxstart[In]

The X-coordinate, in logical units, of the point where filling is to start.

Nystart[In]

The Y-coordinate, in logical units, of the point where filling is to start.

Crcolor[In]

The color of the boundary or of the area to be filled. The interpretationCrcolorDepends on the value ofFufilltypeParameter. To createColorrefColor value, useRGBMacro.

Fufilltype[In]

The type of fill operation to be performed med. This parameter must be one of the following values.

Value

Meaning

Floodfillborder

The fill area is bounded by the color specified byCrcolorParameter. This style is identical to the filling completed MED byFloodfillFunction.

Floodfillsurface

The fill area is defined by the color that is specifiedCrcolor. Filling continues outward in all directions as long as the color is encountered. This style is useful for filling areas with multicolored boundaries.

 

Return Value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Remarks

The following are some of the reasons this function might fail:

  • The filling cocould not be completed.
  • The specified point has the boundary color specified byCrcolorParameter (if floodfillborder was requested ).
  • The specified point does not have the color specifiedCrcolor(If floodfillsurface was requested ).
  • The point is outside the clipping regionthat is, it is not visible on the device.

IfFufilltypeParameter is floodfillborder, the system assumes that the area to be filled is completely bounded by the color specified byCrcolorParameter. The function begins filling at the point specified byNxstartAndNystartParameters and continues in all directions until it reaches the boundary.

IfFufilltypeIs floodfillsurface, the system assumes that the area to be filled is a single color. The function begins to fill the area at the point specifiedNxstartAndNystartAnd continues in all directions ctions, filling all adjacent regions containing the color specifiedCrcolor.

Only memory device contexts and devices that support raster-display operations supportExtfloodfillFunction. To determine whether a device supports this technology, useGetdevicecapsFunction.

Examples

For an example, see "adding lines and graphs to a menu" in using menus.

Requirements

Minimum supported Client

Windows 2000 Professional [desktop apps only]

Minimum supported Server

Windows 2000 Server [desktop apps only]

Header

Wingdi. H (include windows. h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Bitmaps Overview

Bitmap Functions

Floodfill

Getdevicecaps

Colorref

RGB

Can be used to fill irregular areas

Extfloodfill can fill irregular areas

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.