您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetMaxY函数代码示例

51自学网 2021-06-01 21:10:35
  C++
这篇教程C++ GetMaxY函数代码示例写得很实用,希望能帮到您。

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

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

示例1: TouchGetY

/********************************************************************** Function: SHORT TouchGetY()** PreCondition: none** Input: none** Output: y coordinate** Side Effects: none** Overview: returns y coordinate if touch screen is pressed*           and -1 if not** Note: none*********************************************************************/SHORT TouchGetY(){long result;#ifdef SWAP_X_AND_Y    result = ADCGetX();#else    result = ADCGetY();#endif    if(result>=0){#ifdef SWAP_X_AND_Y        result = (GetMaxY()*(result- _calXMin))/(_calXMax - _calXMin);#else        result = (GetMaxY()*(result - _calYMin))/(_calYMax - _calYMin);#endif#ifdef FLIP_Y        result = GetMaxY()- result;#endif    }        return result;}
开发者ID:WilliamAvila,项目名称:PIC32MX460F512L_Examples,代码行数:42,


示例2: Bar

/********************************************************************** Function: WORD Bar(SHORT left, SHORT top, SHORT right, SHORT bottom)** PreCondition: none** Input: left,top - top left corner coordinates,*        right,bottom - bottom right corner coordinates** Output: For NON-Blocking configuration:*         - Returns 0 when device is busy and the shape is not yet completely drawn.*         - Returns 1 when the shape is completely drawn.*         For Blocking configuration:*         - Always return 1.** Side Effects: none** Overview: draws rectangle filled with current color** Note: none*********************************************************************/WORD Bar(SHORT left, SHORT top, SHORT right, SHORT bottom){DWORD address;register SHORT  x,y;    #ifndef USE_NONBLOCKING_CONFIG        while(IsDeviceBusy() != 0); /* Ready */    #else        if(IsDeviceBusy() != 0) return 0;    #endif	if(_clipRgn){        if(left<_clipLeft)           left = _clipLeft;        if(right>_clipRight)           right= _clipRight;        if(top<_clipTop)           top = _clipTop;        if(bottom>_clipBottom)           bottom = _clipBottom;    }#if (DISP_ORIENTATION == 0)    address = (DWORD)LINE_MEM_PITCH*top + left;    CS_LAT_BIT = 0;    for(y=top; y<bottom+1; y++){        SetAddress(address);        for(x=left; x<right+1; x++){            WriteData(_color);        }        address += LINE_MEM_PITCH;    }    CS_LAT_BIT = 1;#else	top = GetMaxY() - top;    bottom = GetMaxY() - bottom;    address = (DWORD)LINE_MEM_PITCH*left + top;    CS_LAT_BIT = 0;    for(y=bottom; y<top+1; y++){        SetAddress(address);        for(x=left; x<right+1; x++){            WriteData(_color);        }        address -= 1;    }    CS_LAT_BIT = 1;#endif    return 1;       }
开发者ID:Gudbrand,项目名称:micro-controllers,代码行数:76,


示例3: TPolyLine3D

TPolyLine3D* BasicHorizontalRectangularDetectorElement::GeneratePolyLine3D(){	TPolyLine3D* pPolyLine = new TPolyLine3D(5);//	printf("---------MinX: %f, Maxx:%f, Miny: %f, MaxY:%f, Z: %f/n", GetMinX(), GetMaxX(), GetMinY(), GetMaxY(), GetZOffset());	pPolyLine->SetPoint(0, GetMinX(), GetMinY(), GetZOffset());	pPolyLine->SetPoint(1, GetMaxX(), GetMinY(), GetZOffset());	pPolyLine->SetPoint(2, GetMaxX(), GetMaxY(), GetZOffset());	pPolyLine->SetPoint(3, GetMinX(), GetMaxY(), GetZOffset());	pPolyLine->SetPoint(4, GetMinX(), GetMinY(), GetZOffset());	return pPolyLine;}
开发者ID:davereikher,项目名称:pps-daq,代码行数:11,


示例4: ClearDevice

/********************************************************************** Function: void ClearDevice(void)** PreCondition: none** Input: none** Output: none** Side Effects: none** Overview: clears screen with current color ** Note: none*********************************************************************/void ClearDevice(void){DWORD     counter;    CS_LAT_BIT = 0;    SetPointer(0,0,GetMaxX(),GetMaxY());    WriteCommand(CMD_WRITE);    for(counter=0; counter<(DWORD)(GetMaxX()+1)*(GetMaxY()+1); counter++){        WriteData(_color.v[1]);        WriteData(_color.v[0]);    }    CS_LAT_BIT = 1;}
开发者ID:Gudbrand,项目名称:micro-controllers,代码行数:28,


示例5: GetMinY

void Camera::SetY(double y) {	if ( !HasBounds() ) {		this->y = y;	} else {		if ( y < GetMinY() )			this->y = GetMinY();		else if ( y > GetMaxY() )			this->y = GetMaxY();		else			this->y = y;	}}
开发者ID:kanc,项目名称:UTAD,代码行数:12,


示例6: Bar

/********************************************************************** Function: void Bar(SHORT left, SHORT top, SHORT right, SHORT bottom)** PreCondition: none** Input: left,top - top left corner coordinates,*        right,bottom - bottom right corner coordinates** Output: none** Side Effects: none** Overview: draws rectangle filled with current color** Note: none*********************************************************************/void Bar(SHORT left, SHORT top, SHORT right, SHORT bottom){DWORD_VAL address;register SHORT  x,y;	if(_clipRgn){        if(left<_clipLeft)           left = _clipLeft;        if(right>_clipRight)           right= _clipRight;        if(top<_clipTop)           top = _clipTop;        if(bottom>_clipBottom)           bottom = _clipBottom;    }#ifdef	USE_PORTRAIT    address.Val = (DWORD)LINE_MEM_PITCH*top + left;    CS_LAT_BIT = 0;    for(y=top; y<bottom+1; y++){        SetAddress(address.v[2],address.v[1],address.v[0]);        for(x=left; x<right+1; x++){            WriteData(_color.v[1],_color.v[0]);        }        address.Val += LINE_MEM_PITCH;    }    CS_LAT_BIT = 1;#else	top = GetMaxY() - top;    bottom = GetMaxY() - bottom;    address.Val = (DWORD)LINE_MEM_PITCH*left + top;    CS_LAT_BIT = 0;    for(y=bottom; y<top+1; y++){        SetAddress(address.v[2],address.v[1],address.v[0]);        for(x=left; x<right+1; x++){            WriteData(_color.v[1],_color.v[0]);        }        address.Val -= 1;    }    CS_LAT_BIT = 1;#endif}
开发者ID:mikewang01,项目名称:Zezus,代码行数:65,


示例7: PutPixel

/********************************************************************** Function: void PutPixel(SHORT x, SHORT y)** PreCondition: none** Input: x,y - pixel coordinates** Output: none** Side Effects: none** Overview: puts pixel** Note: none*********************************************************************/void PutPixel(SHORT x, SHORT y){DWORD_VAL address;    if(_clipRgn){        if(x<_clipLeft)            return;        if(x>_clipRight)            return;        if(y<_clipTop)            return;        if(y>_clipBottom)            return;    }#ifdef	USE_PORTRAIT    address.Val = (long)LINE_MEM_PITCH*y + x;#else    y = GetMaxY() - y;    address.Val = (long)LINE_MEM_PITCH*x + y;#endif    CS_LAT_BIT = 0;    SetAddress(address.v[2],address.v[1],address.v[0]);    WriteData(_color.v[1],_color.v[0]);       CS_LAT_BIT = 1;}
开发者ID:mikewang01,项目名称:Zezus,代码行数:45,


示例8: ClearDevice

/********************************************************************** Function: void ClearDevice(void)** PreCondition: none** Input: none** Output: none** Side Effects: none** Overview: clears screen with current color ** Note: none*********************************************************************/void ClearDevice(void){   int x, y;    DisplayEnable();    SetRegion(0, GetMaxX(), 0, GetMaxY());    DisplaySetCommand();    DeviceWrite(MemoryWrite);    DisplaySetData();    for (x = 0; x < GetMaxY() + 1; x++)    {      for (y = 0; y < GetMaxX() + 1; y++)      {        DeviceWrite(_color);      }    }    DisplayDisable();}
开发者ID:bekeband,项目名称:Mikroe_Graphics_Test.X,代码行数:32,


示例9: PutPixel

/********************************************************************** Function: void PutPixel(SHORT x, SHORT y)** PreCondition: none** Input: x,y - pixel coordinates** Output: none** Side Effects: none** Overview: puts pixel** Note: none*********************************************************************/void PutPixel(SHORT x, SHORT y){DWORD address;    if(_clipRgn){        if(x<_clipLeft)            return;        if(x>_clipRight)            return;        if(y<_clipTop)            return;        if(y>_clipBottom)            return;    }#if (DISP_ORIENTATION == 0)   // x=GetMaxX() - x;    address = (long)LINE_MEM_PITCH*y + x;#else    y = GetMaxY() - y;    address = (long)LINE_MEM_PITCH*x + y;#endif    CS_LAT_BIT = 0;    SetAddress(address);    WriteData(_color);       CS_LAT_BIT = 1;}
开发者ID:gexueyuan,项目名称:11-ru,代码行数:46,


示例10: GetPixel

/********************************************************************** Function: WORD GetPixel(SHORT x, SHORT y)** PreCondition: none** Input: x,y - pixel coordinates ** Output: pixel color** Side Effects: none** Overview: return pixel color at x,y position** Note: none*********************************************************************/WORD GetPixel(SHORT x, SHORT y){WORD_VAL  result;    CS_LAT_BIT = 0;    SetPointer(x,y,GetMaxX(),GetMaxY());        WriteCommand(CMD_READ);    // Start read cycle for LSB    result.v[0] = PMDIN1;    // Wait for reading is done    Nop(); Nop();    // Get LSB and start read cycle for MSB    result.v[0] = PMDIN1;    // Wait for reading is done    Nop(); Nop();    // Disable LCD (it will not accept extra /RD pulse)    CS_LAT_BIT = 1;    // Read MSB    result.v[1] = PMDIN1;    // Wait for dummy reading is done    Nop(); Nop();    return result.Val;}
开发者ID:Gudbrand,项目名称:micro-controllers,代码行数:48,


示例11: GetMaxX

bool FGAFRect::IntersectsRect(const FGAFRect& rect) const{    return !(     GetMaxX() < rect.GetMinX() ||             rect.GetMaxX() <      GetMinX() ||                  GetMaxY() < rect.GetMinY() ||             rect.GetMaxY() <      GetMinY());}
开发者ID:timur-losev,项目名称:GAFUnrealEngine4,代码行数:7,


示例12: PutPixel

/********************************************************************** Function: void PutPixel(SHORT x, SHORT y)** PreCondition: none** Input: x,y - pixel coordinates** Output: none** Side Effects: none** Overview: puts pixel** Note: none*********************************************************************/void PutPixel(SHORT x, SHORT y){    DWORD   address;    if(_clipRgn)    {        if(x < _clipLeft)            return;        if(x > _clipRight)            return;        if(y < _clipTop)            return;        if(y > _clipBottom)            return;    }    #if (DISP_ORIENTATION == 0)    address = (long)LINE_MEM_PITCH * y + x;    #else    y = GetMaxY() - y;    address = (long)LINE_MEM_PITCH * x + y;    #endif    DisplayEnable();    SetAddress(address);    WritePixel(_color);    DisplayDisable();}
开发者ID:Benedito-Augusto,项目名称:TCP20110602,代码行数:43,


示例13: GetMaxY

void FunctionSimple::SetMinY(float f){  // Offset is avg of min and max.  m_offsetY = (f + GetMaxY()) / 2.0f;  // Multiplier is max - offset, or offset - min  m_multiplierY = fabs(f - m_offsetY);}
开发者ID:jason-amju,项目名称:amju-scp,代码行数:7,


示例14: UpdateRange

void CRoiDlg::UpdateRange(){    m_SpinX.SetRange(0,GetMaxX());    m_SpinY.SetRange(0,GetMaxY());    m_SpinWidth.SetRange(1,GetMaxWidth());    m_SpinHeight.SetRange(1,GetMaxHeight());}
开发者ID:vinnie38170,项目名称:klImageCore,代码行数:7,


示例15: LCD_SetArea

/********************************************************************** Function:  LCD_SetArea(start_x,start_y,end_x,end_y)** PreCondition: SetActivePage(page)** Input: start_x, end_x	- start column and end column*		 start_y,end_y 	- start row and end row position (i.e. page address)** Output: none** Side Effects: none** Overview: defines start/end columns and start/end rows for memory access*			from host to SSD1963* Note: none********************************************************************/void LCD_SetArea(u16 start_x, u16 start_y, u16 end_x, u16 end_y){	long offset;	offset = (u16)_activePage*(GetMaxY()+1);	start_y = offset + start_y;	end_y   = offset + end_y;	LCD_WriteCommand(CMD_SET_COLUMN);	Clr_Cs;	LCD_WriteData(start_x>>8);	LCD_WriteData(start_x);	LCD_WriteData(end_x>>8);	LCD_WriteData(end_x);	Set_Cs;	LCD_WriteCommand(CMD_SET_PAGE);	Clr_Cs;	LCD_WriteData(start_y>>8);	LCD_WriteData(start_y);	LCD_WriteData(end_y>>8);	LCD_WriteData(end_y);	Set_Cs;}
开发者ID:candrian,项目名称:SSD1963_STM32F4,代码行数:42,


示例16: ClearDevice

/********************************************************************** Function: void ClearDevice(void)** PreCondition: none** Input: none** Output: none** Side Effects: none** Overview: clears screen with current color ** Note: none*********************************************************************/void ClearDevice(void){    WORD    counter;    DisplayEnable();    // Whole screen	DisplaySetCommand();    DeviceWrite(LASET);    //Line Address Set(lines from 16 to 144 are used)	DisplaySetData();    DeviceWrite(0x10);    //Start Line=16    DeviceWrite(0x8f);    //End Line =144-1	DisplaySetCommand();    DeviceWrite(CASET);    //Column Address Set	DisplaySetData();    DeviceWrite(0x00);    //Start Column=0    DeviceWrite(0x54);    //End Column =84 ((84+1)*3 == 255)	DisplaySetCommand();    DeviceWrite(RAMWR);	DisplaySetData();    for(counter = 0; counter < (WORD) (GetMaxX() + 1) * (GetMaxY() + 1); counter++)    {        DeviceWrite(_color);    }    DisplayDisable();}
开发者ID:Benedito-Augusto,项目名称:TCP20110602,代码行数:43,


示例17: CreateDemo

void CreateDemo(void){	GOLFree();	SetColor(GFX_SCHEMEDEFAULT.CommonBkColor);	ClearDevice();	BtnCreate(ID_BUTTON,		GetMaxX() * 1 / 4,		GetMaxY() * 1 / 3,		GetMaxX() * 3 / 4,		GetMaxY() * 2 / 3,		0, BTN_DRAW, NULL, "Button", NULL);	showDecoration = FALSE;	showDecorationPrev = TRUE; // force redraw}
开发者ID:marcows,项目名称:MLAtor,代码行数:16,


示例18: TouchGetCalPoints

/********************************************************************** Function: void TouchGetCalPoints(WORD* ax, WORD* ay)** PreCondition: InitGraph() must be called before** Input: ax - pointer to array receiving 3 X touch positions*        ay - pointer to array receiving 3 Y touch positions** Output: none** Side Effects: none** Overview: gets values for 3 touches** Note: none*********************************************************************/void TouchGetCalPoints(WORD* ax, WORD* ay){static const XCHAR calStr[] = {'C','A','L','I','B','R','A','T','I','O','N',0};XCHAR calTouchLeft[] = {'3',' ','t','o','u','c','h','e','s',' ','l','e','f','t',0};SHORT counter;SHORT x,y;    SetFont((void*)&GOLFontDefault);    SetColor(BRIGHTRED);    OutTextXY((GetMaxX()-GetTextWidth((XCHAR*)calStr,(void*)&GOLFontDefault))>>1,              (GetMaxY()-GetTextHeight((void*)&GOLFontDefault))>>1,              (XCHAR*)calStr);    for(counter=0; counter<3; counter++){        SetColor(BRIGHTRED);        calTouchLeft[0] = '3' - counter;        OutTextXY((GetMaxX()-GetTextWidth(calTouchLeft,(void*)&GOLFontDefault))>>1,                  (GetMaxY()+GetTextHeight((void*)&GOLFontDefault))>>1,                   calTouchLeft);        // Wait for press        do{            x=ADCGetX(); y=ADCGetY();        }while((y==-1)||(x==-1));        Beep();        *(ax+counter) = x; *(ay+counter) = y;             // Wait for release        do{            x=ADCGetX(); y=ADCGetY();        }while((y!=-1)&&(x!=-1));        SetColor(WHITE);        OutTextXY((GetMaxX()-GetTextWidth(calTouchLeft,(void*)&GOLFontDefault))>>1,                  (GetMaxY()+GetTextHeight((void*)&GOLFontDefault))>>1,                   calTouchLeft);        DelayMs(500);    }}
开发者ID:WilliamAvila,项目名称:PIC32MX460F512L_Examples,代码行数:64,


示例19: PutImage1BPP

/********************************************************************** Function: void PutImage1BPP(SHORT left, SHORT top, FLASH_BYTE* bitmap, BYTE stretch)** PreCondition: none** Input: left,top - left top image corner, bitmap - image pointer,*        stretch - image stretch factor** Output: none** Side Effects: none** Overview: outputs monochrome image starting from left,top coordinates** Note: image must be located in flash*********************************************************************/void PutImage1BPP(SHORT left, SHORT top, FLASH_BYTE* bitmap, BYTE stretch){register FLASH_BYTE* flashAddress;register FLASH_BYTE* tempFlashAddress;BYTE temp;WORD sizeX, sizeY;WORD x,y;BYTE stretchX,stretchY;WORD pallete[2];BYTE mask;    // Move pointer to size information    flashAddress = bitmap + 2;    // Read image size    sizeY = *((FLASH_WORD*)flashAddress);    flashAddress += 2;    sizeX = *((FLASH_WORD*)flashAddress);    flashAddress += 2;    pallete[0] = *((FLASH_WORD*)flashAddress);    flashAddress += 2;    pallete[1] = *((FLASH_WORD*)flashAddress);    flashAddress += 2;    CS_LAT_BIT = 0;    for(y=0; y<sizeY; y++){        tempFlashAddress = flashAddress;        for(stretchY = 0; stretchY<stretch; stretchY++){            flashAddress = tempFlashAddress;            SetPointer(left, top+y, GetMaxX(), GetMaxY());            WriteCommand(CMD_WRITE);            mask = 0;            for(x=0; x<sizeX; x++){                // Read 8 pixels from flash                if(mask == 0){                    temp = *flashAddress;                    flashAddress++;                    mask = 0x80;                }                                // Set color                if(mask&temp){                    SetColor(pallete[1]);                }else{                    SetColor(pallete[0]);                }                // Write pixel to screen                for(stretchX=0; stretchX<stretch; stretchX++){                    WriteData(_color.v[1]);                    WriteData(_color.v[0]);                }                // Shift to the next pixel                mask >>= 1;           }        }    }    CS_LAT_BIT = 1;}
开发者ID:Gudbrand,项目名称:micro-controllers,代码行数:76,


示例20: CreateLightingScreen

/***************************************************************************** * void CreateLightingScreen(void) * * NOTE:  The lighting demo is not available when using the PIC24FJ256GB210. *        The demo requires loading an image from the external memory, the Epson *        S1D13517 () has some routing conflicts which make loading the image *        difficult and not robust.  For these reasons, the lighting demo has *        been take out for a better out of box experience. *****************************************************************************/void CreateLightingScreen(void){    GOL_SCHEME *currentScheme;    currentScheme = GFX_SchemeGetCurrentScheme();    SetColor(currentScheme->Color0);    while(!FillBevel((GetMaxX() >> 2) + 20,90 ,GetMaxX() - 10, GetMaxY()-10,5));				     		while(!AlphaBlendWindow(GetDrawBufferAddress(), (GetMaxX() >> 2) + 15, 85,					 GFX_PAGE1, (GetMaxX() >> 2) + 15, 85,					 GetDrawBufferAddress(), (GetMaxX() >> 2) + 15, 85,				     (GetMaxX())-((GetMaxX() >> 2) + 15), 				     GetMaxY() - 90,  					     GFX_SchemeGetDefaultScheme()->AlphaValue));    SetState(GOLFindObject(PANEL_SCREEN_ID_LIGHTING_BUT), BTN_DISABLED);    if(GetState(GOLFindObject(PANEL_SCREEN_ID_COMFORT_BUT),BTN_DISABLED))    {        ClrState(GOLFindObject(PANEL_SCREEN_ID_COMFORT_BUT), BTN_DISABLED);        SetState(GOLFindObject(PANEL_SCREEN_ID_COMFORT_BUT),BTN_DRAW);    }    if(GetState(GOLFindObject(PANEL_SCREEN_ID_SECURITY_BUT),BTN_DISABLED))    {        ClrState(GOLFindObject(PANEL_SCREEN_ID_SECURITY_BUT), BTN_DISABLED);        SetState(GOLFindObject(PANEL_SCREEN_ID_SECURITY_BUT),BTN_DRAW);    }    if(GetState(GOLFindObject(PANEL_SCREEN_ID_ENERGY_USAGE_BUT),BTN_DISABLED))    {         ClrState(GOLFindObject(PANEL_SCREEN_ID_ENERGY_USAGE_BUT), BTN_DISABLED);        SetState(GOLFindObject(PANEL_SCREEN_ID_ENERGY_USAGE_BUT),BTN_DRAW);    }/*** * See above note in the function comment for more information **/    #ifndef __PIC24FJ256GB210__    GFX_BlockUntilFinished(PutImage((GetMaxX() >> 2)+40, 90+10, (void *) &House, IMAGE_NORMAL));    #endif}
开发者ID:Athuli7,项目名称:Microchip,代码行数:55,


示例21: GetInt

void CRoiDlg::OnKillfocusRoiY(){    m_Roi.height = GetInt(&m_HeightEdit);    m_Roi.y = GetInt(&m_YEdit);    UpdateValue(m_Roi.y, 0, GetMaxY());    UpdateValue(m_Roi.height, 1, GetMaxHeight(), &m_SpinHeight);    UpdateData(FALSE);}
开发者ID:vinnie38170,项目名称:klImageCore,代码行数:8,


示例22: N11_ReadPixel

unsigned char N11_ReadPixel(unsigned char x, unsigned char y){		#if LCDlight == 0	 	if((x > GetMaxX()) || (y > GetMaxY()))			return(0x00);				//exit if coordinates are not legal					return(bit_is_set(N11_Cache[x][y/8], (1 << (y%8))) ? 0x01 : 0x00);	#endif//LCDlight}	//*N11_ReadPixel
开发者ID:3Phase-inverter,项目名称:3phase-inverter,代码行数:8,


示例23: GetMaxY

double XYDataset::GetMaxValue(bool verticalAxis){	if (verticalAxis) {		return GetMaxY();	}	else {		return GetMaxX();	}}
开发者ID:IGNF,项目名称:wxfreechart,代码行数:9,


示例24: CreateAnimation

/************************************************************************ Function: void CreateAnimation(void) Overview: Creates the animation screen. Input: none Output: none************************************************************************/void CreateAnimation(void){    SHORT   j, height, endPoint;    // free memory for the objects in the previous linked list and start new list    GOLFree();    SetColor(SCREEN_BACKGROUND_COLOR);    ClearDevice();    // draw the band of lines with increasing thickness background of the demo    height = 13;    endPoint = GetMaxY() - 35;    SetColor(RGB565CONVERT(0x4C, 0x8E, 0xFF));    for(j = 2; j <= endPoint; j += (height + 6))    {        WAIT_UNTIL_FINISH(Bar(0, j, GetMaxX(), j + height));        if(height <= 0)            height = 0;        else            height -= 1;    }    pPicture = PictCreate               (                   ID_PICTURE1,                        // ID                   PICTURE_XINDENT,                   PICTURE_YINDENT,                   PICTURE_XINDENT + PICTURE_WIDTH - 1,                   PICTURE_YINDENT + PICTURE_HEIGHT - 1,                   PICT_DRAW,                          // will be dislayed, has frame                   2,                                  // scale factor is x1                   (void *) &Engine1,                  // bitmap                   altScheme               );                                      // default GOL scheme    pMeter = MtrCreate             (                 ID_METER2,                 (2 * PICTURE_XINDENT + PICTURE_WIDTH),                 PICTURE_YINDENT - 20,                 (2 * (PICTURE_XINDENT + PICTURE_WIDTH)),                 PICTURE_YINDENT + PICTURE_HEIGHT + 20,                 MTR_DRAW | MTR_RING | MTR_ACCURACY, // draw normal meter object                 MAX_METER_VALUE,                    // set initial value                 0,                 MAX_METER_VALUE,                    // set range                 (void *) &GOLFontDefault,           // Title font to be used                 (void *) &GOLMediumFont,            // Value font to be used                 MeterStr,                           //                 meterScheme             );  // alternative GOL scheme    //pMeter->pTitleFont = (void*)&GOLFontDefault;    //pMeter->pValueFont = (void*)&GOLMediumFont;    // create the demo navigation/control buttons    CreateCtrlButtons(ExitStr, ScaleStr, LeftArrowStr, RightArrowStr);}
开发者ID:huleg,项目名称:Microchip,代码行数:66,


示例25: CreateMainDemoPage

/***************************************** * void CreateMainPage(void) *****************************************/void CreateMainDemoPage(void){	WndCreate	(	    ID_WINDOW1,                 // ID	    0,	    0,	    GetMaxX(),	    GetMaxY(),                  // dimension	    WND_DRAW,                   // will be dislayed after creation	    NULL,                       // icon	    NULL,                       // set text	    NULL                        // default GOL scheme	);                              		BtnCreate	(	    ID_BUTTON_BACK,             // button ID	    0,	    40,                         // left, top corner		    NAV_BTN_WIDTH,	    GetMaxY(),	    0,                          // right, bottom corner (with radius = 0)	    BTN_DRAW,                   // will be dislayed after creation	    NULL,                       // no bitmap		    (XCHAR *)"<",               // LEFT arrow as text	    NULL                        // default GOL scheme	);                              		BtnCreate	(	    ID_BUTTON_NEXT,             // button ID	    GetMaxX() - NAV_BTN_WIDTH,	    40,	    GetMaxX(),	    GetMaxY(),	    0,                          // dimension (with radius = 0)	    BTN_DRAW,                   // will be dislayed and disabled after creation	    NULL,                       // no bitmap	    (XCHAR *)">",               // RIGHT arrow as text	    NULL                        // default GOL scheme	);                          	 	 } 
开发者ID:Athuli7,项目名称:Microchip,代码行数:47,


示例26: GetPixel

WORD GetPixel(SHORT x, SHORT y){    DWORD   address;    WORD    result;        #if (DISP_ORIENTATION == 0)    address = (long)LINE_MEM_PITCH * y + x;        #else    y = GetMaxY() - y;    address = (long)LINE_MEM_PITCH * x + y;        #endif    CS_LAT_BIT = 0;    SetAddress(address);    // Temporary change wait cycles for reading (250ns = 4 cycles)        #if defined(__C30__)    PMMODEbits.WAITM = 4;        #elif defined(__PIC32MX__)    PMMODEbits.WAITM = 8;        #else            #error Need wait states for the device        #endif    RS_LAT_BIT = 1;    // First RD cycle to move data from GRAM to Read Data Latch    result = PMDIN1;    while(PMMODEbits.BUSY);    // Second RD cycle to get data from Read Data Latch    result = PMDIN1;    while(PMMODEbits.BUSY);    // Disable LCD    CS_LAT_BIT = 1;    // Disable PMP    PMCONbits.PMPEN = 1;    // Read result    result = PMDIN1;    // Restore wait cycles for writing (60ns)        #if defined(__dsPIC33F__) || defined(__PIC24H__)    PMMODEbits.WAITM = 2;        #else    PMMODEbits.WAITM = 1;        #endif    // Enable PMP    PMCONbits.PMPEN = 1;    return (result);}
开发者ID:WilliamAvila,项目名称:PIC32MX460F512L_Examples,代码行数:56,


示例27: GetPixel

/********************************************************************** Function: WORD GetPixel(SHORT x, SHORT y)** PreCondition: none** Input: x,y - pixel coordinates ** Output: pixel color** Side Effects: none** Overview: returns pixel color at x,y position** Note: none*********************************************************************/WORD GetPixel(SHORT x, SHORT y){DWORD_VAL address;WORD_VAL  result;#ifdef	USE_PORTRAIT    address.Val = (long)LINE_MEM_PITCH*y + x;#else    y = GetMaxY() - y;    address.Val = (long)LINE_MEM_PITCH*x + y;#endif    CS_LAT_BIT = 0;    SetAddress(address.v[2],address.v[1],address.v[0]);    // Temporary change wait cycles for reading (250ns = 4 cycles)    PMMODEbits.WAITM = 4;    RS_LAT_BIT = 1;    // First RD cycle to move data from GRAM to Read Data Latch    result.v[1] = PMDIN1;    while(PMMODEbits.BUSY);    // Second RD cycle to move data from GRAM to Read Data Latch    result.v[1] = PMDIN1;    while(PMMODEbits.BUSY);    // First RD cycle to get data from Read Data Latch    // Read previous dummy value    result.v[1] = PMDIN1;    while(PMMODEbits.BUSY);    // Second RD cycle to get data from Read Data Latch    // Read MSB    result.v[1] = PMDIN1;    while(PMMODEbits.BUSY);    // Disable LCD     CS_LAT_BIT = 1;    // Disable PMP     PMCONbits.PMPEN  = 1;     // Read LSB    result.v[0] = PMDIN1;    // Restore wait cycles for writing (60ns = 1 cycle)        PMMODEbits.WAITM = 1;    // Enable PMP    PMCONbits.PMPEN  = 1;     return result.Val;}
开发者ID:mikewang01,项目名称:Zezus,代码行数:72,


示例28: ClearDevice

/********************************************************************** Function: void ClearDevice(void)** PreCondition: none** Input: none** Output: none** Side Effects: none** Overview: clears screen with current color ** Note: none*********************************************************************/void ClearDevice(void){DWORD     counter;    CS_LAT_BIT = 0;    SetAddress(0);    for(counter=0; counter<(DWORD)(GetMaxX()+1)*(GetMaxY()+1); counter++){        WriteData(_color);    }    CS_LAT_BIT = 1;}
开发者ID:gexueyuan,项目名称:11-ru,代码行数:26,


示例29: LCD_Clear

/********************************************************************** Function: void ClearDevice(void)** PreCondition: none** Input: none** Output: none** Side Effects: none** Overview: clears screen with current color** Note: none*********************************************************************/void LCD_Clear(u16 color){    u32 xcounter, ycounter;    LCD_SetArea(0,0,GetMaxX(),GetMaxY());    LCD_WriteCommand(CMD_WR_MEMSTART);    Clr_Cs;    for(ycounter=0; ycounter<GetMaxY()+1; ycounter++)    {        for(xcounter=0; xcounter<GetMaxX()+1; xcounter++)        {            LCD_WriteData(color);        }    }    Set_Cs;}
开发者ID:janblumenkamp,项目名称:jufo2015_slam,代码行数:35,


示例30: PutImage4BPP

/********************************************************************** Function: void PutImage4BPP(SHORT left, SHORT top, FLASH_BYTE* bitmap, BYTE stretch)** PreCondition: none** Input: left,top - left top image corner, bitmap - image pointer,*        stretch - image stretch factor** Output: none** Side Effects: none** Overview: outputs 16 color image starting from left,top coordinates** Note: image must be located in flash*********************************************************************/void PutImage4BPP(SHORT left, SHORT top, FLASH_BYTE* bitmap, BYTE stretch){register FLASH_BYTE* flashAddress;register FLASH_BYTE* tempFlashAddress;WORD sizeX, sizeY;register WORD x,y;BYTE temp;register BYTE stretchX,stretchY;WORD pallete[16];WORD counter;    // Move pointer to size information    flashAddress = bitmap + 2;    // Read image size    sizeY = *((FLASH_WORD*)flashAddress);    flashAddress += 2;    sizeX = *((FLASH_WORD*)flashAddress);    flashAddress += 2;    // Read pallete    for(counter=0;counter<16;counter++){        pallete[counter] = *((FLASH_WORD*)flashAddress);        flashAddress += 2;    }    CS_LAT_BIT = 0;         for(y=0; y<sizeY; y++){        tempFlashAddress = flashAddress;        for(stretchY = 0; stretchY<stretch; stretchY++){            flashAddress = tempFlashAddress;            SetPointer(left, top+y, GetMaxX(), GetMaxY());            WriteCommand(CMD_WRITE);            for(x=0; x<sizeX; x++){                // Read 2 pixels from flash                if((x&0x0001) == 0){                    // Set color                    SetColor(pallete[temp>>4]);                }else{                    temp = *flashAddress;                    flashAddress++;                    // Set color                    SetColor(pallete[temp&0x0f]);                }                // Write pixel to screen                       for(stretchX=0; stretchX<stretch; stretchX++){                    WriteData(_color.v[1]);                    WriteData(_color.v[0]);                }                // Shift to the next pixel                temp >>= 4;            }        }
开发者ID:Gudbrand,项目名称:micro-controllers,代码行数:71,



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


C++ GetMem函数代码示例
C++ GetMaxSkillValueForLevel函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。