扫描线种子填充算法 问题

来源:百度知道 编辑:UC知道 时间:2024/06/04 13:39:31
谁能告诉我怎么改啊!

#include<stdio.h>
#include<graphics.h>
#include<conio.h>

struct stack_node;
typedef struct stack_node *pnode;

struct stack_node
{
int x;
int y;
pnode link;
};

struct linkstack
{
pnode top;
};
typedef struct linkstack *plinkstack;
plinkstack stack;

void push(int xx,int yy)
{
pnode new_node;
new_node=(pnode)malloc(sizeof(struct stack_node));
new_node->x=xx;
new_node->y=yy;
new_node->link=stack->top;
stack->top=new_node;
}

void pop(int &xx,int &yy)
{
pnode p;
p=stack->top;
xx=stack->top->x;
yy=stack->top->y;
stack->top=stack->top->link;
free(p);
}

Scanlineseedfill(x,y,fillvalue,boundaryvalue)
int x,y,fillvalue,boundaryvalue;
{
int savex,Xleft,Xright,Xenter,Pflag;
push

她总是携带着我
一圈加一圈,一室加一室建成
他们的路径变得越来越畏缩和迂曲,
我穿着我的白色长袍照了张相片——
先生 :我还能怎样回答,
花儿不的颜色哈哈