ExtFloodFill 可以填充不规则区域

ExtFloodFill function

The ExtFloodFill function fills an area of the display surface with the current brush.

Syntax

C++

BOOL ExtFloodFill(

_In_  HDC 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 interpretation of crColor depends on the value of thefuFillType parameter. To create a COLORREF color value, use the RGB macro.

fuFillType [in]

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


Value


Meaning


FLOODFILLBORDER


The fill area is bounded by the color specified by the crColor parameter. This style is identical to the filling performed by the FloodFill function.


FLOODFILLSURFACE


The fill area is defined by the color that is specified by crColor. 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 could not be completed.
  • The specified point has the boundary color specified by the crColor parameter (if FLOODFILLBORDER was requested).
  • The specified point does not have the color specified by crColor (if FLOODFILLSURFACE was requested).
  • The point is outside the clipping regionthat is, it is not visible on the device.

If the fuFillType parameter is FLOODFILLBORDER, the system assumes that the area to be filled is completely bounded by the color specified by the crColor parameter. The function begins filling at the point specified by the nXStart andnYStart parameters and continues in all directions until it reaches the boundary.

If fuFillType is FLOODFILLSURFACE, the system assumes that the area to be filled is a single color. The function begins to fill the area at the point specified by nXStart and nYStart and continues in all directions, filling all adjacent regions containing the color specified by crColor.

Only memory device contexts and devices that support raster-display operations support the ExtFloodFill function. To determine whether a device supports this technology, use the GetDeviceCaps function.

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

可以用来填充不规则区域

时间: 2024-12-15 02:11:12

ExtFloodFill 可以填充不规则区域的相关文章

Cocos2d-x之绘制填充不规则多边形

自定义的方法 SPoly.h 1 // 2 // SPoly.h 3 // L01DrawingAPI 4 // 5 // Created by Mac OS 10.9.3 on 15-3-30. 6 // 7 // 8 9 #ifndef __L01DrawingAPI__SPoly__ 10 #define __L01DrawingAPI__SPoly__ 11 12 #include <iostream> 13 #include <cocos2d.h> 14 15 using

ios的hitTest方法以及不规则区域内触摸事件处理方法

ios的hitTest方法以及不规则区域内触摸事件处理方法 概述 在正常的使用场景中,我们处理了比较多的矩形区域内触摸事件,比如UIButton.UIControl.一般来说,这些控件的图形以及触摸区域都是矩形或者圆角矩形的.但是在一些特殊应用场景中我们有时不得不面对这样一种比较严苛的需求,比如要求程序只对某个圆形.五角形等非常规区域的点击事件进行处理,这就需要花点功夫了.本文以圆形为例子来介绍此类场景的处理方法. 先看下面一张图(附图1),我们的目标是实现如下自定义tabbar.中间带突起圆形

利用Mask将不规则区域保存下来 算法实现

利用Mask将不规则区域保存下来 Point2f pt1, pt2, pt3, pt4; pt1.x = 17; pt1.y = 75; pt2.x = 374; pt2.y = 48; pt3.x = 44; pt3.y = 249; pt4.x = 394; pt4.y = 234; line(img, pt1, pt2, Scalar(0,0,255),1); line(img, pt1, pt3, Scalar(0,0,255),1); line(img, pt2, pt4, Scala

MFC 用gdi绘制填充多边形区域

MFC 用gdi绘制填充多边形区域 这里的代码是实现一个三角形的绘制,并用刷子填充颜色 在OnPaint()函数里面 运用的是给定的三角形的三个点,很多个点可以绘制多边形 [cpp] view plaincopy CBrush br(RGB(40,130,170)); CRgn rgn; CPoint arrpt[3]; arrpt[0].x = m_rcAT.right-8; arrpt[0].y = m_rcAT.top+m_rcAT.Height()*2/5; arrpt[1].x = a

解决OSPF不规则区域几个方法

因为刚学OSPF路由协议,下面只是个人实验结果,可能也有不准确的地方,请批评指正,谢谢 解决OSPF不规则区域 1.多进程双向重分布 2.Tunnel隧道 3.virtual-link 1.多进程双向重分布: 拓扑: 在R3上有两个OSPF进程,当R3双向多进程重分布时,可以看到两边的路由都能学到 关键配置: [R1]dis cur # sysname R1 # router id 91.1.1.1 # interface Serial0/0/0 link-protocol ppp ip add

课题:前端图像羽化(不规则区域羽化,feather)

下午搜索了一堆相关文章,没有找到符合要求的. 对一张图片应用不规则区域的羽化,该怎么做呢? 首先去查了下 羽化的原理,然而没有什么用, 然后就开始从表现层去研究怎么模拟? idea 1: blur滤镜,可以实现边缘"羽化",但是呢 整个图片都会被模糊.那么可不可以 blur滤镜 后 将它的边缘拿出来给原始图片使用呢?(多层图片叠). 在PS里模拟操作后,程序难度较大. 1:应用blur的层,需要比目标区域大一些,(牵扯程序对点阵外扩的算法) 2:blur层和显示层,边缘结合依然会有&q

OS: 剪裁UIImage部分不规则区域

首先,我们需要把图片展示在界面上.很简单的操作,唯一需要注意的是由于CGContextDrawImage会使用Quartz内以左下角为(0,0)点的坐标系,所以需要使用CGContextTranslateCTM函数和CGContextScaleCTM函数把以左下角为0点的坐标系转化成左上角形式的坐标系. ViewController中的代码: //ViewController中的viewDidLoad方法- (void)viewDidLoad { //从Bundle中读取图片 UIImage *

【原】ios的hitTest方法以及不规则区域内触摸事件处理方法

在正常的使用场景中,我们处理了比较多的矩形区域内触摸事件,比如UIButton.UIControl.一般来说,这些控件的图形以及触摸区域都是矩形或者圆角矩形的.但是在一些特殊应用场景中我们有时不得不面对这样一种比较严苛的需求,比如要求程序只对某个圆形.五角形等非常规区域的点击事件进行处理,这就需要花点功夫了.本文以圆形为例子来介绍此类场景的处理方法. 先看下面一张图(附图1),我们的目标是实现如下自定义tabbar.中间带突起圆形的自定义tabbar曾一度流行,今天我们来粗糙地实现一下. 在附图

26、OSPF配置实验之不规则区域虚链路

1.实验拓扑 按拓扑所示配置好OSPF后,此时由于area2与area0之间隔着area1,此时area2中的R5并没有路由可达area3.area0.area1.为此我们在R3.R4上建立一条虚链路即可. 2.实验配置 R1配置 interface Loopback0 ip address 1.1.1.1 255.255.255.0 interface Serial0/0 ip address 12.1.1.1 255.255.255.0 router ospf 110 router-id 1