示例#1
0
文件: freeselect.c 项目: jalkanen/ppt
///
/// ButtonUp
Local
VOID FreeButtonUp( FRAME *frame, struct MouseLocationMsg *msg )
{
    struct Selection *selection = &frame->selection;
    // WORD xloc = msg->xloc;
    // WORD yloc = msg->yloc;

    if( IsFrameBusy(frame) ) return;

    EraseSelection( frame );

    // Make sure it's closing.
    selection->vertices[selection->nVertices] = selection->vertices[0];
    selection->nVertices++;

    D(bug("Marked final vertex %d at (%d,%d)\n",selection->nVertices-1,
          selection->vertices[0].x, selection->vertices[0].y ));

    FreeMakeBoundingBox( frame );

    BusyAllWindows( globxd );
    ScanFill( frame );
    AwakenAllWindows( globxd );

    UpdateIWSelbox( frame, TRUE );
    DrawSelection( frame, 0L );

    selection->selstatus &= ~SELF_BUTTONDOWN;
}
示例#2
0
void ImgMaskCreator::ScanFill(PelGray8 fillVal)
{
	size_t size = m_position.size();
	for(size_t index =0; index < size; ++index)
	{
		std::vector<TRect2D<int> > rectV = GetFillRectV(index);
		size_t rectNum = rectV.size();
		for(size_t i=0; i<rectNum; ++i)
		{
			ScanFill(rectV[i], fillVal);
		}
	}
}