边界填充算法讲解_边界填充算法

边界填充算法讲解

Boundary fill is the algorithm used frequently in computer graphics to fill a desired color inside a closed polygon having the same boundary color for all of its sides.

边界填充是在计算机图形学中经常使用的算法,用于在其所有边都具有相同边界颜色的封闭多边形内填充所需颜色。

The most approached implementation of the algorithm is a stack-based recursive function.

该算法最接近的实现是基于堆栈的递归函数。

这个怎么运作: (How it works:)

The problem is pretty simple and usually follows these steps:

该问题非常简单,通常按照以下步骤操作:

  1. Take the position of the starting point and the boundary color.

    取起点的位置和边界颜色。
  2. Decide wether you want to go in 4 directions (N, S, W, E) or 8 directions (N, S, W, E, NW, NE, SW, SE).

    确定您要沿4个方向(N,S,W
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值