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

C++ outp函数代码示例

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

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



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

示例1: main


//.........这里部分代码省略.........
		if(a==-1) break;
		sprintf(tmpname,"%s.0%c%c",scene,a/10+'A',a%10+'A');
		if(!indemo) printf("Scene: %s ",tmpname);
		scenelist[scl].data=readfile(tmpname);
		printf("(%i:@%Fp)\n",scl,scenelist[scl].data);
		scl++;
		ip+=2;
	}

	if(!indemo) 
	{
		printf("Press any key to continue...");
		getch();
	}	

	resetscene();

	for(;;)
	{
		_asm
		{
			mov	bx,6
			int	0fch
			mov	a,cx
			mov	b,bx
		}
		if(a>10 && b>46) break;
		if(dis_exit()) return;
	}

 	vid_init(3); ////// oversample x 4
	cp=(char *)(scenem+16);
	//vid_setpal(cp);
	outp(0x3c8,0);
	for(a=0;a<768;a++) outp(0x3c9,cp[a]);
	vid_window(0L,319L,25L,174L,512L,9999999L);
	
	dis_setcopper(2,copper2);
	dis_partstart();
	xit=0;
	coppercnt=0;
	syncframe=0;
	avgrepeat=1;
	cl[0].ready=0;
	cl[1].ready=0;
	cl[2].ready=0;
	cl[3].ready=1;
	while(!dis_exit() && !xit)
	{
		int fov;
		int onum;
		long pflag;
		long dis;
		long l;
		object *o;
		rmatrix *r;

		_asm
		{
			mov	bx,6
			int	0fch
			mov	a,cx
			mov	b,bx
		}
	        if(a>11 && b>54) break;
		
开发者ID:AoJ,项目名称:SecondReality,代码行数:66,代码来源:U2A.C


示例2: Decompress_frame

void Decompress_frame (void)
{
	unsigned short x,y,z,w;
	unsigned short changes, nfo_word, packets, offset, row;
	int frame_pos=0;
	unsigned int scr_pos;
	char c1, c2, c3, a;
	char hi, lo;

	for (z=1; z<=h_frame.actions; z++)
	{
		memmove ( &h_action, (flc_buffer+frame_pos), sizeof(actionheader) );
		switch (h_action.code)
		{
			case  4:
				a=1;//fcl_buffer[frame_pos];
//				b=0;//flc_buffer[frame_pos];
//				c=256; //0=256

				frame_pos+=10;
				outp (0x3c8, 0);
				for (x=0; x<=768; x++) outp (0x3c9, (flc_buffer[(x+frame_pos)]/=4) ); 
				frame_pos+=768;
				break;
			case  7:
				frame_pos+=6;
				lo=flc_buffer[frame_pos]; frame_pos++;
				hi=flc_buffer[frame_pos]; frame_pos++;
				changes=hi*256+lo;
				row=0;

				for (y=0; y<=(changes-1); y++)			// pocet menenych radek
				{
					lo=flc_buffer[frame_pos]; frame_pos++;
					hi=flc_buffer[frame_pos]; frame_pos++;
					nfo_word=hi*256+lo;

					scr_pos=row*h_flc.width;

					if (nfo_word>=0xC000)					// preskakovane radky
					{
					nfo_word=0xFFFF-nfo_word+1;
					row+=nfo_word;
					}

					else
					{
					for (z=1; z<=nfo_word; z++)			// pocet menenych bloku
					{
						x=1; a=0;

						offset = flc_buffer[frame_pos];	 // rel. offset bloku
						frame_pos++;
						scr_pos+=offset;
	
//						while (!a)					// zmena bloku
//						{
							c1 = flc_buffer[frame_pos];
							frame_pos++;

							if (c1>128)
							{
								c1=0xFF-c1+1;
								c2=flc_buffer[frame_pos];
								frame_pos++;
								c3=flc_buffer[frame_pos];
								frame_pos++;

								for (w=1; w<=c1; w++)
								{	frame_buffer[scr_pos]=c2;
									scr_pos++;
									frame_buffer[scr_pos]=c3;
									scr_pos++; }
							}
							else
							{
//								c3=0xFF-c3+1;
								for (w=1; w<=c1; w++)
								{	frame_buffer[scr_pos]=flc_buffer[frame_pos];
									frame_pos++;
									scr_pos++;
									frame_buffer[scr_pos]=flc_buffer[frame_pos];
									frame_pos++;
									scr_pos++; }
							}

//							if (x>=640) a=1;
//						}

					}
					row++;
					}
				}

//				frame_pos+=h_action.size;
				break;
			case 15:
				frame_pos+=6;
				for (y=0; y<=(h_flc.height-1); y++)
				{
//.........这里部分代码省略.........
开发者ID:svn2github,项目名称:Brany_Skeldalu,代码行数:101,代码来源:FLC.C


示例3: switch

void SelfAwareness::iam(const Address &reporter,const InetAddress &reporterPhysicalAddress,const InetAddress &myPhysicalAddress,bool trusted,uint64_t now)
{
	const InetAddress::IpScope scope = myPhysicalAddress.ipScope();

	// This would be weird, e.g. a public IP talking to 10.0.0.1, so just ignore it.
	// If your network is this weird it's probably not reliable information.
	if (scope != reporterPhysicalAddress.ipScope())
		return;

	// Some scopes we ignore, and global scope IPs are only used for this
	// mechanism if they come from someone we trust (e.g. a root).
	switch(scope) {
		case InetAddress::IP_SCOPE_NONE:
		case InetAddress::IP_SCOPE_LOOPBACK:
		case InetAddress::IP_SCOPE_MULTICAST:
			return;
		case InetAddress::IP_SCOPE_GLOBAL:
			if (!trusted)
				return;
			break;
		default:
			break;
	}

	Mutex::Lock _l(_phy_m);
	PhySurfaceEntry &entry = _phy[PhySurfaceKey(reporter,reporterPhysicalAddress,scope)];

	if ( ((now - entry.ts) < ZT_SELFAWARENESS_ENTRY_TIMEOUT) && (!entry.mySurface.ipsEqual(myPhysicalAddress)) ) {
		entry.mySurface = myPhysicalAddress;
		entry.ts = now;
		TRACE("physical address %s for scope %u as seen from %s(%s) differs from %s, resetting paths in scope",myPhysicalAddress.toString().c_str(),(unsigned int)scope,reporter.toString().c_str(),reporterPhysicalAddress.toString().c_str(),entry.mySurface.toString().c_str());

		// Erase all entries in this scope that were not reported from this remote address to prevent 'thrashing'
		// due to multiple reports of endpoint change.
		// Don't use 'entry' after this since hash table gets modified.
		{
			Hashtable< PhySurfaceKey,PhySurfaceEntry >::Iterator i(_phy);
			PhySurfaceKey *k = (PhySurfaceKey *)0;
			PhySurfaceEntry *e = (PhySurfaceEntry *)0;
			while (i.next(k,e)) {
				if ((k->reporterPhysicalAddress != reporterPhysicalAddress)&&(k->scope == scope))
					_phy.erase(*k);
			}
		}

		// Reset all paths within this scope
		_ResetWithinScope rset(RR,now,(InetAddress::IpScope)scope);
		RR->topology->eachPeer<_ResetWithinScope &>(rset);

		// Send a NOP to all peers for whom we forgot a path. This will cause direct
		// links to be re-established if possible, possibly using a root server or some
		// other relay.
		for(std::vector< SharedPtr<Peer> >::const_iterator p(rset.peersReset.begin());p!=rset.peersReset.end();++p) {
			if ((*p)->activelyTransferringFrames(now)) {
				Packet outp((*p)->address(),RR->identity.address(),Packet::VERB_NOP);
				RR->sw->send(outp,true,0);
			}
		}
	} else {
		entry.mySurface = myPhysicalAddress;
		entry.ts = now;
	}
}
开发者ID:asbjornenge,项目名称:ZeroTierOne,代码行数:63,代码来源:SelfAwareness.cpp


示例4: timer_handler

void __interrupt __far timer_handler( union INTPACK r )
{
    if( --TimerMod == 0 )
    {
        TimerMod = TimerMult;
        _CHAIN_TO( old_timer_handler );
    }
    else
    {
        /* end of interrupt (expected by 8259 before you do RETI) */
        outp( INT_CTRL, EOI );
    }

    if( ! SamplerOff )
    {
        if( InsiderTime == 0 )
        {
            ++InsiderTime;
            if( SampleIndex == 0 )
            {
                Samples->pref.tick = CurrTick;
                if( CallGraphMode )
                {
                    CallGraph->pref.tick = CurrTick;
                }
            }
            ++CurrTick;
            #ifdef __NETWARE__
                /* avoid pointer truncation warning */
                RecordSample( (union INTPACK *)FP_OFF(&r) );
            #else
                RecordSample( &r );
            #endif
            if( SampleIndex >= Margin )
            {
                if( InDOS() )
                {
                    Save_Request = TRUE;
                }
                else
                {
                    /*
                        We are not in DOS so we can suspend things for a while
                        and save our block of samples
                    */
                    if( Save_Request )
                    {
                        Save_Request = 0;
                    }
                    StopAndSave();
                }
                if( SampleIndex >= Ceiling )
                {
                    if( CallGraphMode )
                    {
                        --SampleCount;
                        SampleIndex = LastSampleIndex;
                    }
                    else
                    {
                        --SampleIndex;
                    }
                    LostData = TRUE;
                }
            }
            --InsiderTime;
        }
    }
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:69,代码来源:realmode.c


示例5: set_timer_reload

static void set_timer_reload(int reload_val)
{
	outp(PORT_CMD, CMD_CHAN0 | CMD_ACCESS_BOTH | CMD_OP_SQWAVE);
	outp(PORT_DATA0, reload_val & 0xff);
	outp(PORT_DATA0, (reload_val >> 8) & 0xff);
}
开发者ID:mdurrer,项目名称:cgd,代码行数:6,代码来源:timer.c


示例6: main

main()
{
	int	a,b,c,y;
	dis_partstart();
	outp(0x3c4,2);
	outp(0x3c5,15);
	memset(vram,15,32768);
	memset(vram+32768,15,32768);
	//_asm mov ax,80h+13h
	//_asm int 10h
	for(a=0;a<32;a++) dis_waitb();
	outp(0x3c8,0);
	for(a=0;a<255;a++)
	{
		outp(0x3c9,63);
		outp(0x3c9,63);
		outp(0x3c9,63);
	}
	outp(0x3c9,0);
	outp(0x3c9,0);
	outp(0x3c9,0);
	inp(0x3da);
	outp(0x3c0,0x11);
	outp(0x3c0,255);
	outp(0x3c0,0x20);
	//inittwk();
	_asm
	{
		mov	dx,3d4h
		mov	ax,000ch
		out	dx,ax
		mov	ax,000dh
		out	dx,ax
		mov	al,9
		out	dx,al
		inc	dx
		in	al,dx
		and	al,not 80h
		and	al,not 31
		out	dx,al
		mov	dx,3c0h
		mov	al,11h
		out	dx,al
		mov	al,0
		out	dx,al
		mov	al,32
		out	dx,al
	}
	_asm
	{
		mov	dx,3c0h
		mov	al,11h
		out	dx,al
		mov	al,255
		out	dx,al
		mov	al,20h
		out	dx,al
	}

	readp(palette,-1,pic);
	for(y=0;y<400;y++)
	{
		readp(rowbuf,y,pic);
		lineblit(vram+(unsigned)y*80U,rowbuf);
	}

	for(c=0;c<=128;c++)
	{
		for(a=0;a<768-3;a++) pal2[a]=((128-c)*63+palette[a]*c)/128;
		dis_waitb();
		setpalarea(pal2,0,254);
	}
	setpalarea(palette,0,254);
}
开发者ID:AoJ,项目名称:SecondReality,代码行数:74,代码来源:BEG.C


示例7: main

void    main    ( void )
{
	uchar   *video=( uchar * )0xA0000000L;
	uint    pos,x;

	_asm    mov     ax,13h
	_asm    int     10h

	outp( 0x3c8,0 );
	for( x=0; x<256; x++ )
	{
		outp( 0x3c9,x >> 2 );
		outp( 0x3c9,x >> 2 );
		outp( 0x3c9,63 );
	}


	/* sprot. CRT */
	outp( 0x3d4, 0x11 );
	outp( 0x3d5, inp( 0x3d5 ) & 0x7f );

	/* 256 */

	/* ampiezza logica */
	_outcrt( 0x13, 32 );

	/* tot hor */
	_outcrt( 0, 64 + 16 );

	/* fine vis. hor */
	_outcrt( 1, 63 );

	/* iniz blank hor */
	_outcrt( 2, 69 );

	/* fin blank hor */
	_outcrt( 3, 113 );

	/* iniz. ritr. oriz */
	_outcrt( 4, 72 );

	/* fine ritr. oriz */
	_outcrt( 5, 112 );

	/* 240 */

	/*
	_outcrt( 6, 13 );
	_outcrt( 7, 62 );
	_outcrt( 9, 65 );
	_outcrt( 0x10, 234 );
	_outcrt( 0x11, 172 );
	_outcrt( 0x12, 223 );
	_outcrt( 0x14, 0 );
	_outcrt( 0x15, 231 );
	_outcrt( 0x16, 6 );
	_outcrt( 0x17, 227 );

	outpw( 0x3c4, 0x0100 );
	outp( 0x3c2, 0xe3 );
	outpw( 0x3c4, 0x0300 );
	*/

	/* prot. CRT */
	outp( 0x3d4, 0x11 );
	outp( 0x3d5, inp( 0x3d5 ) | 256 );

	for( pos=0; pos<256; pos++ )
		for( x=0; x<256; x++ )
		video[ ( pos << 8 ) | x ]= ( unsigned char ) ( pos + x );

	getch();

	_asm    mov     ax,3h
	_asm    int     10h
}
开发者ID:cloudify,项目名称:pixpack,代码行数:76,代码来源:256X256.C


示例8: LM78_WRITE

// #define LM78_WRITE(addr,data) outp(LM78_ADDRESS,addr);outp(LM78_DATA,data)
void LM78_WRITE(int addr, int data)
    {
    outp(LM78_ADDRESS, addr);
    outp(LM78_DATA, data);
    }
开发者ID:OS2World,项目名称:UTIL-MAINBOARD-epox,代码行数:6,代码来源:EPoX_8RDA6.c


示例9: serial_init_rx

/* Set up uart stuff; expects DDR register to already be set up */
void serial_init_rx(void)
{
	outp(BPS(115200, CPUFREQ), UBRR);
	outp(inp(UCR) | (1 << RXCIE) | (1 << RXEN), UCR);
}
开发者ID:jsgf,项目名称:frond,代码行数:6,代码来源:serial_rx.c


示例10: LM78_EXIST

int LM78_EXIST(void)
    {
    outp(LM78_ADDRESS,LM78_IN0);
    inp(LM78_DATA);
    return(inp(LM78_ADDRESS) == LM78_IN0);
    }
开发者ID:OS2World,项目名称:UTIL-MAINBOARD-epox,代码行数:6,代码来源:EPoX_8RDA6.c


示例11: LM78_READ

// #define LM78_READ(addr)       ({outp(LM78_ADDRESS,addr);inp(LM78_DATA);})
int LM78_READ(int addr)
    {
    outp(LM78_ADDRESS,addr);
    return(inp(LM78_DATA));
    }
开发者ID:OS2World,项目名称:UTIL-MAINBOARD-epox,代码行数:6,代码来源:EPoX_8RDA6.c


示例12: out_word

/* Output a word to an I/O port. */
static void
out_word(unsigned int p,unsigned int d)
{
  outp(p, d & 0xff);
  outp(p + 1, (d >> 8) & 0xff);
}
开发者ID:0871087123,项目名称:rtems,代码行数:7,代码来源:vgainit.c


示例13: up_addrenv_restore

int up_addrenv_restore(hw_addrenv_t oldenv)
{
  outp(Z180_MMU_CBR, (uint8_t)oldenv);
  return OK;
}
开发者ID:casro,项目名称:vrbrain_nuttx,代码行数:5,代码来源:z180_mmu.c


示例14: key_handler


//.........这里部分代码省略.........
		break;
	default:
		// Parse scancode and break bit
		if (key_data.E1Flag > 0 )	{		// Special code for Pause, which is E1 1D 45 E1 9D C5
			key_data.E1Flag--;
			if ( scancode == 0x1D )	{
				scancode	= KEY_PAUSE;
				breakbit	= 0;
			} else if ( scancode == 0x9d ) {
				scancode	= KEY_PAUSE;
				breakbit	= 1;
			} else {
				break;		// skip this keycode
			}
		} else if ( scancode==0xE1 )	{
			key_data.E1Flag = 2;
			break;
		} else {
			breakbit	= scancode & 0x80;		// Get make/break bit
			scancode &= 0x7f;						// Strip make/break bit off of scancode
			scancode |= key_data.E0Flag;					// Add in extended key code
		}
		key_data.E0Flag = 0;								// Clear extended key code

		if (breakbit)	{
			// Key going up
			keyd_last_released = scancode;
			keyd_pressed[scancode] = 0;
			key_data.NumUps[scancode]++;
			temp = 0;
			temp |= keyd_pressed[KEY_LSHIFT] || keyd_pressed[KEY_RSHIFT];
			temp |= keyd_pressed[KEY_LALT] || keyd_pressed[KEY_RALT];
			temp |= keyd_pressed[KEY_LCTRL] || keyd_pressed[KEY_RCTRL];
#ifndef NDEBUG
			temp |= keyd_pressed[KEY_DELETE];
			if ( !(keyd_editor_mode && temp) )
#endif		// NOTICE LINK TO ABOVE IF!!!!
				key_data.TimeKeyHeldDown[scancode] += timer_get_fixed_secondsX() - key_data.TimeKeyWentDown[scancode];
		} else {
			// Key going down
			keyd_last_pressed = scancode;
			keyd_time_when_last_pressed = timer_get_fixed_secondsX();
			if (!keyd_pressed[scancode])	{
				// First time down
				key_data.TimeKeyWentDown[scancode] = timer_get_fixed_secondsX();
				keyd_pressed[scancode] = 1;
				key_data.NumDowns[scancode]++;
#ifndef NDEBUG
				if ( (keyd_pressed[KEY_LSHIFT]) && (scancode == KEY_BACKSP) ) 	{
					keyd_pressed[KEY_LSHIFT] = 0;
					Int5();
				}
#endif
			} else if (!keyd_repeat) {
				// Don't buffer repeating key if repeat mode is off
				scancode = 0xAA;		
			} 

			if ( scancode!=0xAA ) {
				keycode = scancode;

				if ( keyd_pressed[KEY_LSHIFT] || keyd_pressed[KEY_RSHIFT] )
					keycode |= KEY_SHIFTED;

				if ( keyd_pressed[KEY_LALT] || keyd_pressed[KEY_RALT] )
					keycode |= KEY_ALTED;

				if ( keyd_pressed[KEY_LCTRL] || keyd_pressed[KEY_RCTRL] )
					keycode |= KEY_CTRLED;

#ifndef NDEBUG
				if ( keyd_pressed[KEY_DELETE] )
					keycode |= KEY_DEBUGGED;
#endif

				temp = key_data.keytail+1;
				if ( temp >= KEY_BUFFER_SIZE ) temp=0;

				if (temp!=key_data.keyhead)	{
					key_data.keybuffer[key_data.keytail] = keycode;
					key_data.time_pressed[key_data.keytail] = keyd_time_when_last_pressed;
					key_data.keytail = temp;
				}
			}
		}
	}

#ifndef NDEBUG
#ifdef PASS_KEYS_TO_BIOS
	_chain_intr( key_data.prev_int_9 );
#endif
#endif

	temp = inp(0x61);		// Get current port 61h state
	temp |= 0x80;			// Turn on bit 7 to signal clear keybrd
	outp( 0x61, temp );	// Send to port
	temp &= 0x7f;			// Turn off bit 7 to signal break
	outp( 0x61, temp );	// Send to port
	outp( 0x20, 0x20 );	// Reset interrupt controller
}
开发者ID:NonCreature0714,项目名称:descent2,代码行数:101,代码来源:KEY.C


示例15: outwGUS

static void outwGUS(unsigned int baseport,unsigned int reg,unsigned int val)
{
  outp(baseport+0x103, reg);
  outpw(baseport+0x104, val);
}
开发者ID:en-vorobiov,项目名称:mpxplay,代码行数:5,代码来源:SC_GUS.C


示例16: initialize_timer_frequency

// Initialize_timer_frequency to ~2.8ms.
void initialize_timer_frequency( void )
{
    outp( 0x42, 0x3c );
    outp( 0x40, 0x00 );
    outp( 0x40, 0x10 );
}
开发者ID:Ichimonji10,项目名称:impedimenta,代码行数:7,代码来源:xtimer.c


示例17: inGUS

static unsigned int inGUS(unsigned int baseport,unsigned int reg)
{
  outp(baseport+0x103, reg);
  return inp(baseport+0x105);
}
开发者ID:en-vorobiov,项目名称:mpxplay,代码行数:5,代码来源:SC_GUS.C


示例18: _outp

int			 _RTL_FUNC _outp(unsigned short port, int val)
{
    return outp(port, val);
}
开发者ID:NoSuchProcess,项目名称:OrangeC,代码行数:4,代码来源:_conio.c


示例19: beg_main

beg_main()
{
    char    far *vram=MK_FP(0x0a000,0);
	int	a,b,c,y;
	unsigned char al;

	dis_partstart();
	outp(0x3c4,2);
	outp(0x3c5,15);
	memset(vram,15,32768);
	memset(vram+32768,15,32768);
	//_asm mov ax,80h+13h
	//_asm int 10h
	for(a=0;a<32;a++) dis_waitb();
	outp(0x3c8,0);
	for(a=0;a<255;a++)
	{
		outp(0x3c9,63);
		outp(0x3c9,63);
		outp(0x3c9,63);
	}
	outp(0x3c9,0);
	outp(0x3c9,0);
	outp(0x3c9,0);
	inp(0x3da);
	outp(0x3c0,0x11);
	outp(0x3c0,255);
	outp(0x3c0,0x20);
	//inittwk();

	outport(0x3D4, 0x000C);
	outport(0x3D4, 0x000D);
	outp(0x3D4, 9);
	al = inp(0x3D5);
	al &= ~0x80;
	al &= ~31;
	outp(0x3D5, al);
	outp(0x3C0, 0x11);
	outp(0x3C0, 0);
	outp(0x3C0, 32);

	outp(0x3C0, 0x11);
	outp(0x3C0, 255);
	outp(0x3C0, 0x20);

	readp(palette,-1,pic);
	for(y=0;y<400;y++)
	{
		readp(rowbuf,y,pic);
		lineblit(vram+(unsigned)y*80U,rowbuf);
	}

	for(c=0;c<=128;c++)
	{
		for(a=0;a<768-3;a++) pal2[a]=((128-c)*63+palette[a]*c)/128;
		dis_waitb();
		setpalarea(pal2,0,254);
	}
	setpalarea(palette,0,254);
}
开发者ID:Falken42,项目名称:SecondReality,代码行数:60,代码来源:beg.c


示例20: while

void KoskoStudy::makePath(QString path, QVector<int> &nowImg) {
	int lenOfNum;
	QVector<int> intPath;
	int leftBorder = 10000, upperBorder = -1000, rightBorder = -1000, bottomBorder = 10000, tmp;
	QVector<bool> isInc;
	while (path != "") {
		if (path[1] == '|') {
			isInc << 0;
			path = path.right(path.size() - 3);
			if (path == "")
				break;
		}
		else
			isInc << 1;
		lenOfNum = path.indexOf(",", 0);
		tmp = path.left(lenOfNum).toInt();
		intPath << tmp;
		if (tmp < leftBorder) {
			leftBorder = tmp;
		}
		if (tmp > rightBorder) {
			rightBorder = tmp;
		}
		path = path.right(path.size() - lenOfNum - 2);
		lenOfNum = path.indexOf(" ", 0);
		tmp = path.left(lenOfNum).toInt();
		intPath << tmp;
		if (tmp < bottomBorder) {
			bottomBorder = tmp;
		}
		if (tmp > upperBorder) {
			upperBorder = tmp;
		}
		path = path.right(path.size() - lenOfNum - 3);
	}
	int i;
	for (i = 0; i < intPath.size(); i += 2) {
		intPath[i] -= leftBorder;
		intPath[i + 1] -= bottomBorder;
	}
	nowImg.fill(0);
	int width = rightBorder - leftBorder + 1;
	int height = upperBorder - bottomBorder + 1;
	QVector<int> img (width * height, 0);
	for (i = 0; i < intPath.size() - 2; i += 2) {
		if (isInc[1 + i / 2]) {
			makeLine(intPath.at(i)
					 , intPath.at(i + 1)
					 , intPath.at(i + 2)
					 , intPath.at(i + 3)
					 , width
					 , height
					 , img
					 );
		}
	}
	int leftCM, rightCM, upperCM, bottomCM;
	makeMassCentres(img, width, height, leftCM, rightCM, upperCM, bottomCM);
	fitToSize(intPath, isInc, nowImg, leftCM, rightCM, upperCM, bottomCM);
	outp(nowImg);
}
开发者ID:tprodanov,项目名称:KoskoNetwork,代码行数:61,代码来源:KoskoStudy.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ outportb函数代码示例发布时间:2022-05-30
下一篇:
C++ osal_mem_free函数代码示例发布时间: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