• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ PaintRect函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中PaintRect函数的典型用法代码示例。如果您正苦于以下问题:C++ PaintRect函数的具体用法?C++ PaintRect怎么用?C++ PaintRect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了PaintRect函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: drawcolorpopup

static void drawcolorpopup (Rect menurect) {

	short i, j;
	Rect r;	
	
	pushforecolor (&lightbluecolor);
	
	PaintRect (&menurect);
	
	for (i = 0; i < 8; i++) {
	
		for (j = 0; j < 32; j++) {
		
			getitemrect (i * 32 + j + 1, &r);
			
			OffsetRect (&r, menurect.left, menurect.top);
			
			RGBForeColor (&blackcolor);
			
			InsetRect (&r, 1, 1);
			
			PaintRect (&r);
			
			InsetRect (&r, 1, 1);
			
			RGBForeColor (&(*ctable) [i * 32 + j].rgb);
			
			PaintRect (&r);
			} /*for*/
		} /*for*/
	
	popforecolor ();
	} /*drawcolorpopup*/
开发者ID:pombredanne,项目名称:Frontier,代码行数:33,代码来源:appletcolorpopup.c


示例2: DrawPowerMeter

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//	DrawPowerMeter
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
static void DrawPowerMeter(float avePower, float peakValue, int yoffset )
{
	if(avePower < -50.0 ) avePower = -50.0;		// only show from -50 -> 0dB
	float scaledPower = 200.0 * (avePower + 50.0) / 50.0;
	
	if(peakValue < -50.0 ) peakValue = -50.0;		// only show from -50 -> 0dB
	float scaledPeak = 200.0 * (peakValue + 50.0) / 50.0;
	
	RGBColor color;
	color.red = 0;
	color.blue = 0;
	color.green = 65535;
	RGBForeColor(&color);
	
	const int xoffset = 20;
	
	
	Rect powerRect = {yoffset, xoffset, yoffset+8, xoffset + int(scaledPower) };
	PaintRect(&powerRect);
	
	powerRect.left = xoffset + int(scaledPower);
	powerRect.right = xoffset + 200;
	color.red = 32768;
	color.blue = 32768;
	RGBForeColor(&color );
	PaintRect(&powerRect);
	
	color.red = 40000;
	color.blue = 40000;
	color.green = 40000;
	RGBForeColor(&color );
	MoveTo(xoffset + int(scaledPeak), yoffset );
	LineTo(xoffset + int(scaledPeak), yoffset+7 );
}
开发者ID:arnelh,项目名称:Examples,代码行数:38,代码来源:AUMixer3DView.cpp


示例3: drawProc

static pascal void drawProc(ControlRef inControl, SInt16 inPart)
{
	#pragma unused(inControl, inPart)
	
	int i;
	RGBColor saveForeColor;
	RGBColor saveBackColor;
	PenState savePenState;

	GetForeColor(&saveForeColor);	
	GetBackColor(&saveBackColor);	
	GetPenState(&savePenState);

	RGBForeColor(&rgbBlack);
	RGBBackColor(&rgbWhite);
	PenNormal();
	
	for (i = 0; i < sNumMonitors; i++)
	{
		RGBForeColor(&rgbGray);
		PaintRect(&sMonitors[i].scaledRect);
		if (sMonitors[i].isMain)
		{
			Rect r = sMonitors[i].scaledRect;
			InsetRect(&r, 1, 1);
			r.bottom = r.top + 6;
			RGBForeColor(&rgbWhite);
			PaintRect(&r);
			RGBForeColor(&rgbBlack);
			PenSize(1,1);
			MoveTo(r.left, r.bottom);
			LineTo(r.right, r.bottom);
		}
		if (sMonitors[i].device == sSelectedDevice)
		{
			PenSize(3,3);
			RGBForeColor(&rgbBlack);
			FrameRect(&sMonitors[i].scaledRect);
		}
		else
		{
			PenSize(1,1);
			RGBForeColor(&rgbBlack);
			FrameRect(&sMonitors[i].scaledRect);
		}
	}
	
	// restore the original pen state and colors
	RGBForeColor(&saveForeColor);	
	RGBBackColor(&saveBackColor);	
	SetPenState(&savePenState);
}
开发者ID:0culus,项目名称:Doom3-for-MacOSX-,代码行数:52,代码来源:PickMonitor.cpp


示例4: GetPort

void cPict::draw(){
	RGBColor store_color;
	Rect rect = frame;
	GrafPtr cur_port;
	GetPort(&cur_port);
	SetPortWindowPort(parent->win);
	
	if(!visible){ // Erase it
		InsetRect(&rect, -3, -3);
		tileImage(rect,bg_gworld,bg[parent->bg]);
		return;
	}
	if(picNum < 0) { // Just fill with black
		GetForeColor(&store_color);
		ForeColor(blackColor);
		PaintRect(&rect);
		RGBForeColor(&store_color);
		return;
	}
	GetBackColor(&store_color);
	BackColor(whiteColor);
	
	drawPict()[picType](picNum,rect);
	if(drawFramed) drawFrame(2,0);
	SetPort(cur_port);
}
开发者ID:PBrookfield,项目名称:cboe-msvc,代码行数:26,代码来源:pict.cpp


示例5: MyDrawString

void MyDrawString(/*short dir,*/ short h, short v, char *s,Boolean framed,short selectMode)
{
	Rect r;
	if(sharedPrinting)selectMode = POINTDRAWFLAG;
	if(strlen(s) >0)
	{
		GetTextOffsets(/*dir,*/s,&h,&v);
		GetStringRect(s,h,v,&r);
		if(selectMode == BADPOINTDRAWFLAG)selectMode = POINTDRAWFLAG;
		if(selectMode == POINTDRAWFLAG)
		{
			EraseRect(&r);
			MyMoveTo(h,v);
			drawstring(s);
		}
		if(framed)
		{		
			
			if(selectMode != POINTDRAWFLAG)
			{
				PenMode(patXor);PaintRect(&r);
			}
			PenMode(patCopy);
			MyFrameRect(&r);
		}
	}
}
开发者ID:JamesMakela-NOAA,项目名称:PyGnome,代码行数:27,代码来源:CONTDLG.cpp


示例6: PaintRect

void cPict::drawCustomMonstLg(short num, Rect to_rect){
	static const short adj[4] = {0, 8, 4, 12};
	num += adj[animFrame];
	Rect small_monst_rect = {0,0,18,14};
	to_rect.right = to_rect.left + 28;
	to_rect.bottom = to_rect.top + 36;
	PaintRect(&to_rect);
	
	Rect from_rect;
	short n = get_custom_rect(num,from_rect);
	if(!isSheetSet(SHEET_CUSTOM,n)) throw xMissingSheet(SHEET_CUSTOM,n);
	GWorldPtr from_gw = customSheets[n];
	OffsetRect(&small_monst_rect,to_rect.left,to_rect.top);
	rect_draw_some_item(from_gw, from_rect, small_monst_rect, (Point){0,0}, transparent);
	
	n = get_custom_rect(num,from_rect);
	if(!isSheetSet(SHEET_CUSTOM,n)) throw xMissingSheet(SHEET_CUSTOM,n);
	from_gw = customSheets[n];
	OffsetRect(&small_monst_rect,14,0);
	rect_draw_some_item(from_gw, from_rect, small_monst_rect, (Point){0,0}, transparent);
	
	n = get_custom_rect(num,from_rect);
	if(!isSheetSet(SHEET_CUSTOM,n)) throw xMissingSheet(SHEET_CUSTOM,n);
	from_gw = customSheets[n];
	OffsetRect(&small_monst_rect,-14,18);
	rect_draw_some_item(from_gw, from_rect, small_monst_rect, (Point){0,0}, transparent);
	
	n = get_custom_rect(num,from_rect);
	if(!isSheetSet(SHEET_CUSTOM,n)) throw xMissingSheet(SHEET_CUSTOM,n);
	from_gw = customSheets[n];
	OffsetRect(&small_monst_rect,14,0);
	rect_draw_some_item(from_gw, from_rect, small_monst_rect, (Point){0,0}, transparent);
}
开发者ID:PBrookfield,项目名称:cboe-msvc,代码行数:33,代码来源:pict.cpp


示例7: mac_ctl_refresh_trc

static void mac_ctl_refresh_trc()
{
	int		i;
	Rect	r;
	RGBColor	black={0,0,0},
				darkGray={0x2000,0x2000,0x2000};

	if( !win.show ) return;
	SetPortWindowPort(win.ref);
	for( i=0; i<16; i++ ){
		DrawInstrumentName(i, instr_comment[i].comm);
	}
	
#define MAX_NOTE_NUM 120
	r.top=		UPPER_MERGIN;
	r.left=		LEFT_MERGIN;
	r.bottom=	r.top+CHANNEL_HIGHT*16;
	r.right=	r.left+CHANNEL_WIDTH*MAX_NOTE_NUM;
	RGBForeColor(&darkGray);
	PaintRect(&r);
	
		//draw separater line
	RGBForeColor(&black);
	for(i=1; i<16; i++){	//horizontal
		MoveTo(LEFT_MERGIN, UPPER_MERGIN+CHANNEL_HIGHT*i-1);
		Line(CHANNEL_WIDTH*MAX_NOTE_NUM-1, 0);
	}
	for(i=12; i<MAX_NOTE_NUM; i+=12){	//vertical
		MoveTo(LEFT_MERGIN+CHANNEL_WIDTH*i-1, UPPER_MERGIN);
		Line(0, CHANNEL_HIGHT*16-1);
	}
}
开发者ID:OS2World,项目名称:MM-SOUND-TiMidity-MCD,代码行数:32,代码来源:mac_trace.c


示例8: MyDrawUserItem

static void MyDrawUserItem(DialogRef theDialog, DialogItemIndex itemNo)
{
	DialogItemType itemType;
	Handle itemHandle;
	Rect itemBox;
	GetDialogItem(theDialog, itemNo, &itemType, &itemHandle, &itemBox);
	
	CGrafPtr savePort;
	GetPort(&savePort);
	SetPortDialogPort(theDialog);
	
	PenState penState;
	GetPenState(&penState);
	
	PenSize(3, 3);
	if (itemType & itemDisable)
	{
		Pattern gray;
		PenPat(GetQDGlobalsGray(&gray));
	}
	FrameRect(&itemBox);
	Rect userRect = {gUserV-4, gUserH-4, gUserV+4, gUserH+4};
	PaintRect(&userRect);
	
	SetPenState(&penState);
	SetPort(savePort);
}
开发者ID:fruitsamples,项目名称:DialogsToHIViews,代码行数:27,代码来源:main.c


示例9: drawBackground

void drawBackground()
{
	Rect		rect;
	RGBColor	color;
	Rect		tempRect1;
	
	color.red = color.green = color.blue = 8700;
	
	RGBForeColor( &color );
	PaintRect( GetPortBounds(GetWindowPort(gWindow), &tempRect1));
	
	TextFont( kFontIDTimes );
	TextMode( srcOr );
	TextSize( 24 );
	
	drawName( 85, 22, "\pSource Image" );
	drawName( GetPortBounds(GetWindowPort(gWindow), &tempRect1)->right - 215, 22, "\pNew Image" );
	
	GetPortBounds(GetWindowPort(gWindow), &tempRect1);
	SetRect( &rect, 15, tempRect1.bottom - 180, tempRect1.right - 15, tempRect1.bottom - 30);
	drawDeepBox( &rect );
	
	TextSize( 12 );
	
	drawName( tItem[0].rect.left, tItem[0].rect.top - 8, "\pTransfer Mode" );
	drawName( aItem[0].rect.left, aItem[0].rect.top - 8, "\pArithmetic Mode" );
	drawName( cItem[0].rect.left, cItem[0].rect.top - 8, "\pColorization" );
	drawName( dItem[0].rect.left, dItem[0].rect.top - 8, "\pDither" );
	drawName( mItem[0].rect.left, mItem[0].rect.top - 8, "\pColor Mapping" );
	drawName( bItem[0].rect.left, bItem[0].rect.top - 8, "\pDestination" );
	drawName( pItem[0].rect.left, pItem[0].rect.top - 8, "\pPaint Bucket" );
	drawName( lItem[0].rect.left, lItem[0].rect.top - 8, "\pLasso Tool" );
}
开发者ID:fruitsamples,项目名称:QuickDraw_FX,代码行数:33,代码来源:main.c


示例10: PreviewDrawer

void PreviewDrawer(ControlRef Ctrl, void *Data)
{
	// Don't need the data arg here
	CrosshairData &Crosshairs = GetCrosshairData();	// An alias for the global crosshair data
	
	// No need for the window context -- it's assumed
	Rect Bounds = {0,0,0,0};
	
	GetControlBounds(Ctrl, &Bounds);
	
	// Get ready to draw!
	PenNormal();
	
	// Draw the background
	RGBForeColor(&BkgdColor);
	PaintRect(&Bounds);
	
	// Clip to inside of box
	ClipRect(&Bounds);
	
	// Draw the crosshairs
	Crosshairs_Render(Bounds);
	
	// Draw the boundary line
	ForeColor(blackColor);
	FrameRect(&Bounds);
}
开发者ID:Aleph-One-Marathon,项目名称:alephone-dingoo,代码行数:27,代码来源:PlayerDialogs.cpp


示例11: ListBoxDrawProc

static pascal void ListBoxDrawProc( ControlRef browser , DataBrowserItemID item , DataBrowserPropertyID property ,
    DataBrowserItemState itemState , const Rect *itemRect , SInt16 depth , Boolean isColorDevice )
{

    CFStringRef      cfString;
    long        systemVersion;

    cfString  = CFStringCreateWithFormat( NULL, NULL, CFSTR("Row %d"), item );
  
    ThemeDrawingState themeState ;
    GetThemeDrawingState( &themeState ) ;
  
    if ( itemState == kDataBrowserItemIsSelected )      //  In this sample we handle the "selected" state, all others fall through to our "active" state
    {
        Gestalt( gestaltSystemVersion, &systemVersion );
        if ( (systemVersion >= 0x00001030) && (IsControlActive( browser ) == false) )  //  Panther DB starts using kThemeBrushSecondaryHighlightColor for inactive browser hilighting
            SetThemePen( kThemeBrushSecondaryHighlightColor, 32, true );
        else
            SetThemePen( kThemeBrushPrimaryHighlightColor, 32, true );

        PaintRect( itemRect );                //  First paint the hilite rect, then the text on top
        SetThemeDrawingState( themeState , false ) ;
    }
    DrawThemeTextBox( cfString, kThemeApplicationFont, kThemeStateActive, true, itemRect, teFlushDefault, NULL );
    if ( cfString != NULL )  
        CFRelease( cfString );
    SetThemeDrawingState( themeState , true ) ;
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:28,代码来源:listbox.cpp


示例12: NotificationWndOnPaint

static void NotificationWndOnPaint(HWND hwnd, NotificationWnd *wnd)
{
    PAINTSTRUCT ps;
    HDC hdcWnd = BeginPaint(hwnd, &ps);

    ClientRect rect(hwnd);
    DoubleBuffer buffer(hwnd, rect);
    HDC hdc = buffer.GetDC();
    HFONT oldfnt = SelectFont(hdc, wnd->font);

    RECT rTmp = rect.ToRECT();
    DrawFrameControl(hdc, &rTmp, DFC_BUTTON, DFCS_BUTTONPUSH);
    if (wnd->highlight) {
        SetBkMode(hdc, OPAQUE);
        SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT));
        SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT));
    }
    else {
        SetBkMode(hdc, TRANSPARENT);
        SetTextColor(hdc, GetSysColor(COLOR_WINDOWTEXT));
    }

    rect.Inflate(-PADDING, -PADDING);
    RectI rectMsg = rect;
    if (wnd->hasProgress)
        rectMsg.dy -= PROGRESS_HEIGHT + PADDING / 2;
    if (wnd->hasCancel)
        rectMsg.dx -= 20;
    ScopedMem<WCHAR> text(win::GetText(hwnd));
    rTmp = rectMsg.ToRECT();
    DrawText(hdc, text, -1, &rTmp, DT_SINGLELINE | DT_NOPREFIX);

    if (wnd->hasCancel) {
        rTmp = GetCancelRect(hwnd).ToRECT();
        DrawFrameControl(hdc, &rTmp, DFC_CAPTION, DFCS_CAPTIONCLOSE | DFCS_FLAT);
    }

    if (wnd->hasProgress) {
        rect.dx = wnd->progressWidth;
        rect.y += rectMsg.dy + PADDING / 2;
        rect.dy = PROGRESS_HEIGHT;
        PaintRect(hdc, rect);

        rect.x += 2;
        rect.dx = (wnd->progressWidth - 3) * wnd->progress / 100;
        rect.y += 2;
        rect.dy -= 3;

        HBRUSH brush = GetStockBrush(BLACK_BRUSH);
        rTmp = rect.ToRECT();
        FillRect(hdc, &rTmp, brush);
        DeleteObject(brush);
    }

    SelectFont(hdc, oldfnt);

    buffer.Flush(hdcWnd);
    EndPaint(hwnd, &ps);
}
开发者ID:DBNinja,项目名称:sumatrapdf,代码行数:59,代码来源:Notifications.cpp


示例13: DrawItem

static void DrawItem(Rect *r,short i,short j)
{
	Rect	penRect;
	short	cx=(r->left+r->right)/2,cy=(r->top+r->bottom)/2;
	
	SetRect(&penRect,cx-(j+1)/2,cy-(i+1)/2,cx+(j+2)/2,cy+(i+2)/2);
	PaintRect(&penRect);
}
开发者ID:amatubu,项目名称:iconparty,代码行数:8,代码来源:PenSize_MDEF.c


示例14: Size

void Paragraph::Style::Init() {
	align = ALIGN_LEFT;
	before = lm = rm = indent = after = 0;
	bulletindent = 0;
	bulletsize = Size(0, 0);
	bulletcolor = Black;
	bullet = PaintRect();
}
开发者ID:ultimatepp,项目名称:mirror,代码行数:8,代码来源:DocTypes.cpp


示例15: PaintCtrlChar

static
int PaintCtrlChar(USPFONT *uspFont, HDC hdc, int xpos, int ypos, ULONG chValue, COLORREF fg, COLORREF bg)
{
	WCHAR str[8];
	RECT  rect;
	SIZE  size;
	int	  mode = USP_CTLCHR_HEX;
	int   height;

	// get the textual representation of the control-character
	CtrlStr(chValue, mode, str, 8);

	// get the text dimension (only need width)
	GetTextExtentPoint32(hdc, str, wcslen(str), &size);

	// center the control-character "glyph" 
	xpos += uspFont->yborder/2 + 1;

	if(mode == USP_CTLCHR_ASC || mode == USP_CTLCHR_HEX)
		height = max(uspFont->capheight, uspFont->numheight);
	else
		height = uspFont->numheight;

	SetRect(
		&rect, 
		xpos + 1, 
		ypos + uspFont->tm.tmAscent - height - uspFont->yborder,
		xpos + size.cx + uspFont->xborder * 2 - 2, 
		ypos + uspFont->tm.tmAscent + uspFont->yborder
	  );

	//if(rect.top < ypos+1)
	//	rect.top = ypos+1;
	
	// prepare the background 'round' rectangle
	PaintRect(hdc, &rect, bg);
	InflateRect(&rect, 1,-1);
	PaintRect(hdc, &rect, bg);

	// finally paint the text
	SetTextColor(hdc, fg);
	TextOut(hdc, xpos + uspFont->xborder, ypos, str, wcslen(str));

	return 0;
}
开发者ID:MakiseKurisu,项目名称:Neatpad,代码行数:45,代码来源:UspCtrl.c


示例16: ASSERT

void CCaptionPainter::PaintSolidCaption(CRect& capRect, COLORREF theColor)
{
	ASSERT(m_pParentDlg);
	CWnd& wnd = (CWnd&)*m_pParentDlg;

	// Get caption DC and rectangle
	CWindowDC dcWin(&wnd);					// window DC
	CDC dcMem;									// memory DC
	dcMem.CreateCompatibleDC(&dcWin);		// ...create it

	CBitmap bm;
	CBitmap* pOldBitmap;

	int cxCap = capRect.Width();
	int cyCap = capRect.Height();

	bm.CreateCompatibleBitmap(&dcWin, cxCap, cyCap); // create one
	pOldBitmap = dcMem.SelectObject(&bm);	// select bitmap into memory DC


	if (!m_bActive) 
	{
		// Inactive caption
		PaintRect(dcMem, 0, 0, cxCap, cyCap, GetSysColor(COLOR_INACTIVECAPTION));
	}
	else
	{
		PaintRect(dcMem, 0, 0, cxCap, cyCap, theColor);
	}

	// draw icon and buttons
	int cxIcon  = DrawIcon( &dcMem );
	int cxButns = DrawButtons( &dcMem, capRect.Size() );

	CRect rc(CPoint(0,0), capRect.Size()); // text rectangle
	rc.left  += cxIcon+2;						// start after icon
	rc.right -= cxButns;							// don't draw past buttons
	// draw text
	DrawWindowText(&dcMem, rc);
	
	// blast bits to screen
	dcWin.BitBlt(capRect.left, capRect.top,
					capRect.Width(),capRect.Height(),&dcMem,0,0,SRCCOPY);
	dcMem.SelectObject(pOldBitmap); // restore DC
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:45,代码来源:PaintCap.cpp


示例17: eraseRect

void eraseRect( Rect *rect )
{
	RGBColor	color;
	
	color.red = color.green = color.blue = 8700;
	
	RGBForeColor( &color );
	PaintRect( rect );
}
开发者ID:fruitsamples,项目名称:QuickDraw_FX,代码行数:9,代码来源:main.c


示例18: calc_rect

void cPict::drawPresetBoom(short num, Rect to_rect){
	if(!isSheetSet(SHEET_BOOM)) throw xMissingSheet(SHEET_BOOM);
	GWorldPtr from_gw = boom;
	Rect from_rect = calc_rect(num % 8, num / 8);
	to_rect.right = to_rect.left + 28;
	to_rect.bottom = to_rect.top + 36;
	PaintRect(&to_rect);
	rect_draw_some_item(from_gw, from_rect, to_rect, (Point){0,0}, transparent);
}
开发者ID:PBrookfield,项目名称:cboe-msvc,代码行数:9,代码来源:pict.cpp


示例19: printf

void cPict::drawPartyPc(short num, Rect to_rect){
	printf("Drawing graphic %i as a custom space pic.\n",num);
	to_rect.right = to_rect.left + 28;
	to_rect.bottom = to_rect.top + 32;
	if(!isSheetSet(SHEET_PARTY)) throw xMissingSheet(SHEET_PARTY);
	GWorldPtr from_gw = save;
	Rect from_rect = get_custom_rect(num);
	PaintRect(&to_rect);
	rect_draw_some_item(from_gw, from_rect, to_rect, (Point){0,0}, transparent);
}
开发者ID:PBrookfield,项目名称:cboe-msvc,代码行数:10,代码来源:pict.cpp


示例20: apply_unseen_mask

void apply_unseen_mask()
{
	Rect base_rect = {9,9,53,45},to_rect,big_to = {13,13,337,265};
	GrafPtr old_port;
	short i,j,k,l;
	ConstPatternParam c;
	bool need_bother = false;
	
	if (PSD[SDF_NO_FRILLS] > 0)
		return;

	if ((is_combat()) && (which_combat_type == 0))
		return;
	if (!(is_out()) && (univ.town->lighting_type > 0))
		return;
		
	for (i = 0; i < 11; i++)
		for (j = 0; j < 11; j++) 
			if (unexplored_area[i + 1][j + 1] == 1)
				need_bother = true;
	if (need_bother == false)
		return;
				
	GetPort(&old_port);
	SetPort(terrain_screen_gworld);
	//p = *bw_pats[3];
	//c = p;
	c = *bw_pats[3];
	PenPat(c);
	PenMode(notPatOr);
	
	for (i = 0; i < 11; i++)
		for (j = 0; j < 11; j++) 
			if (unexplored_area[i + 1][j + 1] == 1) {

					to_rect = base_rect;
					OffsetRect(&to_rect,-28 + i * 28,-36 + 36 * j);
					SectRect(&to_rect,&big_to,&to_rect);
					PaintRect(&to_rect);
					//PaintRoundRect(&to_rect,4,4);
					for (k = i - 2; k < i + 1; k++)
						for (l = j - 2; l < j + 1; l++)
							if ((k >= 0) && (l >= 0) && (k < 9) && (l < 9) && ((k != i - 1) || (l != j - 1)))
								terrain_there[k][l] = -1;

				}
	
	//p = *bw_pats[6];
	//c = p;
	c = *bw_pats[6];
	PenPat(c);
	PenMode(patCopy);
	SetPort(old_port);
}
开发者ID:PBrookfield,项目名称:cboe-msvc,代码行数:54,代码来源:boe.newgraph.cpp



注:本文中的PaintRect函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ PanicAlert函数代码示例发布时间:2022-05-30
下一篇:
C++ Paint函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap