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

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

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

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

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

示例1: InitDrawing

/*----------------------------------------------------------------------  DrawSkewingArrows  Draw/Clear the four arrows arround the objet that indicate the skewing  direction.  *----------------------------------------------------------------------*/void AmayaTransformEvtHandler::DrawSkewingArrows(){  InitDrawing (5, 1, 0);  glEnable(GL_COLOR_LOGIC_OP);#ifdef _WINDOWS  glLogicOp(GL_COPY_INVERTED);#else /* _WINDOWS */  glLogicOp(GL_XOR);#endif /* _WINDOWS */  glColor4ub (127, 127, 127, 0);  /*    ----3-----    |        |    1        2    |        |    ----4-----  */  /* 1 */  DrawArrow (FrameId, 1, 5,             left2 - CURSOR_SIZE/2,             (top2+bottom2)/2 - CURSOR_SIZE,             CURSOR_SIZE,             2*CURSOR_SIZE,             90, 3, 0);  /* 2 */  DrawArrow (FrameId, 1, 5,             right2 - CURSOR_SIZE/2,             (top2+bottom2)/2 - CURSOR_SIZE,             CURSOR_SIZE,             2*CURSOR_SIZE,             90, 3, 0);  /* 3 */  DrawArrow (FrameId, 1, 5,             (left2+right2)/2 - CURSOR_SIZE,             top2 - CURSOR_SIZE/2,             2*CURSOR_SIZE,             CURSOR_SIZE,             0, 3, 0);  /* 4 */  DrawArrow (FrameId, 1, 5,             (left2+right2)/2 - CURSOR_SIZE,             bottom2 - CURSOR_SIZE/2,             2*CURSOR_SIZE,             CURSOR_SIZE,             0, 3, 0);  glDisable(GL_COLOR_LOGIC_OP);#ifdef _WINDOWS  GL_Swap (FrameId);#endif /* WINDOWS */}
开发者ID:ArcScofield,项目名称:Amaya,代码行数:65,


示例2: glColor3f

void Graphics::render(AIController *aiController){    if (!initialized) {        error->log(GRAPHICS, IMPORTANT, "Render function called without graphics initialization/n");        return;    }    glColor3f(0,1,0);    // Uncomment to render AI debug info    Kinematic k = aiController->agent->getKinematic();    render(aiController->path.knots);    Vec3f closest = aiController->path.closestPoint(aiController->target);    glColor3f(0,1,0);    DrawArrow(k.pos, aiController->target - k.pos);    DrawArrow(aiController->target, closest - aiController->target);    if (aiController->seeObstacle)    {        glColor3f(1,0,0);        DrawArrow(k.pos, aiController->antiTarget - k.pos);    }}
开发者ID:amitahire,项目名称:z-fight-club,代码行数:25,


示例3: CJK_D

void CCJKShapeLine::DrawArrow(QPainter *painter, const QLineF &line){	CJK_D(CCJKShapeLine);	double angle = ::acos(line.dx() / line.length());	if (line.dy() >= 0)		angle = (CJKPi * 2) - angle;	if (d->arrowBeginType != ArrowNone)	{		qreal arrowSize = d->pen.width() + d->arrowBeginSize;		QPointF arrowP1;		QPointF arrowP2;		arrowP1 = line.p1() + QPointF(sin(angle + CJKPi / 3) * arrowSize,			cos(angle + CJKPi / 3) * arrowSize);		arrowP2 = line.p1() + QPointF(sin(angle + CJKPi - CJKPi / 3) * arrowSize,			cos(angle + CJKPi - CJKPi / 3) * arrowSize);		DrawArrow(painter, d->arrowBeginType, line.p1(), arrowP1, arrowP2, arrowSize);	}	if (d->arrowEndType != ArrowNone)	{		qreal arrowSize = d->pen.width() + d->arrowEndSize;		QPointF arrowP1;		QPointF arrowP2;		arrowP1 = line.p2() - QPointF(sin(angle + CJKPi / 3) * arrowSize,			cos(angle + CJKPi / 3) * arrowSize);		arrowP2 = line.p2() - QPointF(sin(angle + CJKPi - CJKPi / 3) * arrowSize,			cos(angle + CJKPi - CJKPi / 3) * arrowSize);		DrawArrow(painter, d->arrowEndType, line.p2(), arrowP1, arrowP2, arrowSize);	}}
开发者ID:kinglonglee,项目名称:cjk,代码行数:29,


示例4: Render

 virtual void Render() {     // Draw the axes outside th3e client area     GG::Pt begin(ClientUpperLeft().x - AXIS_WIDTH/2, ClientLowerRight().y + AXIS_HEIGHT/2);     GG::Pt x_end(ClientLowerRight().x, begin.y);     GG::Pt y_end(begin.x, ClientUpperLeft().y);     DrawArrow(begin, x_end);     DrawArrow(begin, y_end); }
开发者ID:freeorion-archive,项目名称:fo-svn-mirror,代码行数:8,


示例5: DrawArrow

//+++-S-cf-------------------------------------------------------------------//  NAME:       DrawArrow()//  DESC:       Draw arrow//  PARAMETERS: CHART_HPAINT hp, //              int pos,//              bool over//  RETURN:     None//----------------------------------------------------------------------E-+++void wxLegend::DrawArrow(    CHART_HPAINT hp,     int pos,    bool over){        //-----------------------------------------------------------------------    // Get actual configuration    //-----------------------------------------------------------------------    wxBrush oldBrush = hp->GetBrush();    wxPen oldPen = hp->GetPen();        //-----------------------------------------------------------------------    // if mouse over use different colours    //-----------------------------------------------------------------------        if (over)    {                hp->SetBrush( *wxBLACK_BRUSH );        hp->SetPen( *wxBLACK_PEN );    }    else    {        hp->SetBrush( *wxGREY_BRUSH );        hp->SetPen( *wxBLACK_PEN );    }        if ( pos == ARROW_DOWN )    {        //-------------------------------------------------------------------        // If mouse position has change than redraw arrow        //-------------------------------------------------------------------        if (m_ArrowDown.m_sel != over)        {            DrawArrow(hp, m_ArrowDown.m_x, m_ArrowDown.m_y, 8, pos, over);        }    }    if ( pos == ARROW_UP )    {        //-------------------------------------------------------------------        // If mouse position has change than redraw arrow        //-------------------------------------------------------------------        if (m_ArrowUp.m_sel != over)        {            DrawArrow(hp, m_ArrowUp.m_x, m_ArrowUp.m_y, 8, pos, over);        }    }            //-----------------------------------------------------------------------    // Set old colours    //-----------------------------------------------------------------------    hp->SetBrush( oldBrush );    hp->SetPen( oldPen );    }
开发者ID:stahta01,项目名称:EmBlocks_old,代码行数:63,


示例6: buffer

void Clock::Draw(BView *view, int32){	BScreen screen;	BBitmap buffer(view->Bounds(), screen.ColorSpace(), true);	BView offscreen(view->Bounds(), NULL, 0, 0);	buffer.AddChild(&offscreen);	buffer.Lock();	int n;	float a,R;	float width = view->Bounds().Width();	float height = view->Bounds().Height();	float zoom = (height/1024) * 0.85;	time(&tmptodaytime);	TodayTime = localtime(&tmptodaytime);	todaysecond = TodayTime->tm_sec;	todayminute = TodayTime->tm_min + (todaysecond/60.0);	todayhour   = TodayTime->tm_hour + (todayminute/60.0);	rgb_color bg_color = {0,0,0};	offscreen.SetHighColor(bg_color);	offscreen.SetLowColor(bg_color);	offscreen.FillRect(offscreen.Bounds());	offscreen.SetHighColor(200,200,200);	for(n=0,a=0,R=510*zoom;n<60;n++,a+=(2*M_PI)/60) {		float x = width/2 + R * cos(a);		float y = height/2 + R * sin(a);		DrawBlock(&offscreen,x,y,a,14*zoom);	}	offscreen.SetHighColor(255,255,255);	for(n=0,a=0,R=500*zoom;n<12;n++,a+=(2*M_PI)/12) {		float x = width/2 + R * cos(a);		float y = height/2 + R * sin(a);		DrawBlock(&offscreen,x,y,a,32*zoom);	}	offscreen.SetHighColor(255,255,255);	DrawArrow(&offscreen, width/2,height/2, ( ((2*M_PI)/60) * todayminute) - (M_PI/2), 220*zoom, 1, 8*zoom);	DrawArrow(&offscreen, width/2,height/2, ( ((2*M_PI)/12) * todayhour) - (M_PI/2), 140*zoom, 1, 14*zoom);	offscreen.FillEllipse(BPoint(width/2,height/2),24*zoom,24*zoom);	offscreen.SetHighColor(250,20,20);	DrawArrow(&offscreen, width/2,height/2, ( ((2*M_PI)/60) * todaysecond) - (M_PI/2), 240*zoom, 1, 4*zoom);	offscreen.FillEllipse(BPoint(width/2,height/2),20*zoom,20*zoom);	offscreen.Sync();	buffer.Unlock();	view->DrawBitmap(&buffer);	buffer.RemoveChild(&offscreen);}
开发者ID:jiangxilong,项目名称:haiku,代码行数:55,


示例7: DrawDebugArrow

	void DrawDebugArrow(const Vector3Df& from, const Vector3Df& to)	{		float currentAlpha = g_CurrentColor.a;		glEnable(GL_BLEND);		glDisable(GL_DEPTH_TEST);		g_CurrentColor.a = 0.5f;		DrawArrow(from, to);		glEnable(GL_DEPTH_TEST);		g_CurrentColor.a = currentAlpha;		DrawArrow(from, to);	}
开发者ID:TrevinLiberty,项目名称:CaptainLucha,代码行数:13,


示例8: centerAxleLoadPrepare

void centerAxleLoadPrepare(void){	const uint16_t WHEEL_RADIUS = 25;	const uint16_t WHEEL_HEIGHT = 30;	const uint16_t POS_X1       = 245;	const uint16_t POS_Y1_2     = 165;	const uint16_t POS_X2       = 555;	const uint16_t POS_X3       = POS_X1;	const uint16_t POS_X6       = POS_X2;	const uint16_t POS_X4       = POS_X3 + (WHEEL_RADIUS*2);	const uint16_t POS_X5       = POS_X6 - (WHEEL_RADIUS*2);	const uint16_t POS_Y3       = 280;	//      ___                   ___  //     |   |                 |   |//     | 1 |-----------------| 2 |//     |___|                 |___|////      ___ ___           ___ ___//     |   |   |         |   |   |//     | 3 | 4 |---------| 5 | 6 |//     |___|___|         |___|___|    ClearCenterLayers();    XGdcDrawDimension(&g_stcMyGDC_DrvCTX, GDC_16BPP_FORMAT, L2ADR0, WIN_WIDTH, WIN_HEIGHT);    XGdcSetAttrLine(&g_stcMyGDC_DrvCTX, GDC_LINE_WIDTH, 3);	XGdcColor(&g_stcMyGDC_DrvCTX, GDC_YELLOW16);  //    DrawLine(POS_X1+WHEEL_RADIUS, POS_Y1_2+(WHEEL_HEIGHT/2), POS_X2-WHEEL_RADIUS, POS_Y1_2+(WHEEL_HEIGHT/2));    DrawLine(POS_X4+WHEEL_RADIUS, POS_Y3+(WHEEL_HEIGHT/2), POS_X5-WHEEL_RADIUS, POS_Y3+(WHEEL_HEIGHT/2));      //    MyGDC_DrawBitmap16(L2ADR0, POS_X1 - (WHEEL_BITMAP_WIDTH/2), POS_Y1_2+(WHEEL_HEIGHT/2) - (WHEEL_BITMAP_HEIGHT / 2), WHEEL_BITMAP_WIDTH, WHEEL_BITMAP_HEIGHT, Bitmap_au16Wheel);//    MyGDC_DrawBitmap16(L2ADR0, POS_X2 - (WHEEL_BITMAP_WIDTH/2), POS_Y1_2+(WHEEL_HEIGHT/2) - (WHEEL_BITMAP_HEIGHT / 2), WHEEL_BITMAP_WIDTH, WHEEL_BITMAP_HEIGHT, Bitmap_au16Wheel);//    XGdcSetAlpha(&g_stcMyGDC_DrvCTX, 10);    MyGDC_DrawBitmap16(L2ADR0, POS_X3 - (WHEEL_BITMAP_WIDTH/2), POS_Y3+(WHEEL_HEIGHT/2) - (WHEEL_BITMAP_HEIGHT / 2), WHEEL_BITMAP_WIDTH, WHEEL_BITMAP_HEIGHT, Bitmap_au16Wheel);	MyGDC_DrawBitmap16(L2ADR0, POS_X4 - (WHEEL_BITMAP_WIDTH/2), POS_Y3+(WHEEL_HEIGHT/2) - (WHEEL_BITMAP_HEIGHT / 2), WHEEL_BITMAP_WIDTH, WHEEL_BITMAP_HEIGHT, Bitmap_au16Wheel);    MyGDC_DrawBitmap16(L2ADR0, POS_X5 - (WHEEL_BITMAP_WIDTH/2), POS_Y3+(WHEEL_HEIGHT/2) - (WHEEL_BITMAP_HEIGHT / 2), WHEEL_BITMAP_WIDTH, WHEEL_BITMAP_HEIGHT, Bitmap_au16Wheel);    MyGDC_DrawBitmap16(L2ADR0, POS_X6 - (WHEEL_BITMAP_WIDTH/2), POS_Y3+(WHEEL_HEIGHT/2) - (WHEEL_BITMAP_HEIGHT / 2), WHEEL_BITMAP_WIDTH, WHEEL_BITMAP_HEIGHT, Bitmap_au16Wheel);           XGdcColor(&g_stcMyGDC_DrvCTX, GDC_WHITE16);	    DrawArrow(WIN_WIDTH / 2, POS_Y1_2+(WHEEL_HEIGHT/2), 0);    DrawArrow(WIN_WIDTH / 2, POS_Y3+(WHEEL_HEIGHT/2), 0);    Text_DrawText("12.3", FALSE, WIN_WIDTH / 2, 107, FONT_ALIGN_CENTER, FONT_ARIAL36, L2ADR0, MYGDC_COL555(28,28,28));    	    Text_DrawText("25.9", FALSE, WIN_WIDTH / 2, 219, FONT_ALIGN_CENTER, FONT_ARIAL36, L2ADR0, MYGDC_COL555(28,28,28));         TransferDisplayList(&g_stcMyGDC_DrvCTX);	XGdcCancelDisplayList(&g_stcMyGDC_DrvCTX);		XGdcDrawDimension(&g_stcMyGDC_DrvCTX, GDC_16BPP_FORMAT, TEX_1_ADR, 128, 128);	    XGdcBltDraw16(&g_stcMyGDC_DrvCTX, 0, 0, WHEEL_BITMAP_WIDTH, WHEEL_BITMAP_HEIGHT, Bitmap_au16Wheel);	}
开发者ID:sektor1986,项目名称:SHP-8151,代码行数:50,


示例9: NumPages

//+++-S-cf-------------------------------------------------------------------//  NAME:       Draw()//  DESC:       Draw legend//  PARAMETERS: CHART_HPAINT hp, //              CHART_HRECT hr//  RETURN:     None//----------------------------------------------------------------------E-+++void wxLegend::Draw(    CHART_HPAINT hp,     CHART_HRECT hr){        int iPages = NumPages();    int iLines = iPages > 0 ? ROWS_PAGE : GetCount();    wxCoord h;    //h = (ROWS_PAGE * ROW_SIZE < hr->h) ? ROWS_PAGE * ROW_SIZE : hr->h;    h = (iLines * ROW_SIZE < hr->h) ? iLines * ROW_SIZE : hr->h;    wxCoord x, y;    x = (wxCoord)( 5 + hr->x );    y = (wxCoord)( 5 + hr->y );    //-----------------------------------------------------------------------    // draw arrows    //-----------------------------------------------------------------------    if ( iPages > 0 )    {        hp->SetBrush( *wxGREY_BRUSH );        hp->SetPen( *wxBLACK_PEN );                DrawArrow( hp, x+hr->w/2, y, 8, ARROW_UP, false );        hp->DrawLine( x+15, y+10, x+hr->w-15, y+10);        DrawArrow( hp, x+hr->w/2, y + 20, 8, ARROW_DOWN, false );    }    //-----------------------------------------------------------------------    // draw shadow    //-----------------------------------------------------------------------    y += 30;    hp->SetBrush( *wxGREY_BRUSH );    hp->SetPen( *wxTRANSPARENT_PEN );    hp->DrawRectangle( x +5, y +5, hr->w - 10, h );    //-----------------------------------------------------------------------    // draw legend window    //-----------------------------------------------------------------------    hp->SetBrush( *wxWHITE_BRUSH );    hp->SetPen( *wxBLACK_PEN );    hp->DrawRectangle( x, y, hr->w - 10, h );    //-----------------------------------------------------------------------    // write labels    //-----------------------------------------------------------------------    WriteLabel( hp, x+3, y+3, m_Page );}
开发者ID:stahta01,项目名称:EmBlocks_old,代码行数:56,


示例10: DrawArrow

void wxStdRenderer::DrawScrollbarArrow(wxDC& dc,                                       wxDirection dir,                                       const wxRect& rect,                                       int flags){    DrawArrow(dc, dir, rect, flags);}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:7,


示例11: uround

voidWindArrowRenderer::Draw(Canvas &canvas, const Angle screen_angle,                        const SpeedVector wind, const PixelPoint pos,                        const PixelRect rc, WindArrowStyle arrow_style){  // Draw arrow (and tail)  const unsigned length = uround(Quadruple(wind.norm));  DrawArrow(canvas, pos, wind.bearing - screen_angle, length, arrow_style);  // Draw wind speed label  StaticString<12> buffer;  buffer.Format(_T("%i"), iround(Units::ToUserWindSpeed(wind.norm)));  canvas.SetTextColor(COLOR_BLACK);  canvas.Select(*look.font);  const unsigned offset = uround(M_SQRT2 * wind.norm);  BulkPixelPoint label[] = {    { 18, -26 - int(offset) },  };  PolygonRotateShift(label, ARRAY_SIZE(label),                     pos, wind.bearing - screen_angle);  TextInBoxMode style;  style.align = TextInBoxMode::Alignment::CENTER;  style.vertical_position = TextInBoxMode::VerticalPosition::CENTERED;  style.shape = LabelShape::OUTLINED;  TextInBox(canvas, buffer, label[0].x, label[0].y, style, rc);}
开发者ID:nkgautam,项目名称:XCSoar,代码行数:32,


示例12: Q_UNUSED

void ScreenshotEditWidget::paintEvent(QPaintEvent* event){    Q_UNUSED(event);    QPainter painter(this);    painter.drawPixmap(ui->screenshotDisplayWidget->x(), ui->screenshotDisplayWidget->y(),                       _source->width(), _source->height(), _newPixmap);    painter.fillRect(ui->colorDisplayWidget->x(), ui->colorDisplayWidget->y(),                     ui->colorDisplayWidget->width(), ui->colorDisplayWidget->height(), _color);    painter.drawRect(ui->screenshotDisplayWidget->x(), ui->screenshotDisplayWidget->y(),                     ui->screenshotDisplayWidget->width(), ui->screenshotDisplayWidget->height());    if (_toolActive) {        QPen pen;        pen.setColor(_color);        pen.setWidth(3);        painter.setPen(pen);        if (_selectedTool == ST_Rectangle) {            painter.drawRect(ui->screenshotDisplayWidget->x() + _startToolPosition.x(),                             ui->screenshotDisplayWidget->y() + _startToolPosition.y(),                             _lastToolPosition.x() - _startToolPosition.x(),                             _lastToolPosition.y() - _startToolPosition.y());        } else if (_selectedTool == ST_Arrow) {            DrawArrow(painter,                        ui->screenshotDisplayWidget->x() + _startToolPosition.x(),                        ui->screenshotDisplayWidget->y() + _startToolPosition.y(),                        ui->screenshotDisplayWidget->x() + _lastToolPosition.x(),                        ui->screenshotDisplayWidget->y() + _lastToolPosition.y());        }    }}
开发者ID:Sandra357,项目名称:Pastexen,代码行数:30,


示例13: painter

void ScreenshotEditWidget::mouseReleaseEvent(QMouseEvent* event) {    if (event->button() != Qt::RightButton &&            event->button() != Qt::MidButton &&            _toolActive == true)    {        QPainter painter(&_newPixmap);        QPen pen;        pen.setColor(_color);        pen.setWidth(3);        painter.setPen(pen);        if (_selectedTool == ST_Rectangle) {            painter.drawRect(_startToolPosition.x(),                             _startToolPosition.y(),                             _lastToolPosition.x() - _startToolPosition.x(),                             _lastToolPosition.y() - _startToolPosition.y());        } else if (_selectedTool == ST_Arrow) {            DrawArrow(painter,                        _startToolPosition.x(),                        _startToolPosition.y(),                        _lastToolPosition.x(),                        _lastToolPosition.y());        }    }    _toolActive = false;    update();}
开发者ID:Sandra357,项目名称:Pastexen,代码行数:26,


示例14: LoseLife

void LoseLife(char *reason) {	//Draw cracked screen - but draw all the rest of the world & hud first	CloseGraphics();	OpenGraphics();	DrawWorld(&world, cameraPos, cameraAngle);	DrawHUD();	DrawArrow(cameraAngle.y);	DrawRadarDots(true);	DrawRadarArm(sweepAngle * sweepStepCount++);	DrawRadarDots(false);	//finally!	DrawCrackedScreen();	SetTextColor(RED);	DrawText(25,40,reason);	if (--lives<=0) {		SetTextColor(GREEN);		DrawText(30,55,"GAME OVER!");	}	Show();	PlaySound(SOUND_EXPLOSION);	//dead?	if (lives<=0) {		Sleep(2000);		//Reset back to splash screen		ResetTimer();		mode=0;		Splash();	} else {		// Hit but still going		InitialiseWorld();	}}
开发者ID:RorschachUK,项目名称:Trakr,代码行数:33,


示例15: DrawXlibMenu

//根据Menu内容来绘制菜单内容void DrawXlibMenu(XlibMenu * menu){    FcitxSkin *sc = &menu->owner->skin;    FcitxClassicUI *classicui = menu->owner;    Display* dpy = classicui->dpy;    GC gc = XCreateGC(dpy, menu->menuWindow, 0, NULL);    int i = 0;    int fontheight;    int iPosY = 0;    int dpi = sc->skinFont.respectDPI? menu->owner->dpi: 0;    FCITX_UNUSED(dpi);    fontheight = FontHeight(menu->owner->menuFont, sc->skinFont.menuFontSize, dpi);    SkinImage *background = LoadImage(sc, sc->skinMenu.backImg, false);    GetMenuSize(menu);    EnlargeCairoSurface(&menu->menu_cs, menu->width, menu->height);    if (background) {        cairo_t* cr = cairo_create(menu->menu_cs);        DrawResizableBackground(cr, background->image, menu->height, menu->width,                                sc->skinMenu.marginLeft,                                sc->skinMenu.marginTop,                                sc->skinMenu.marginRight,                                sc->skinMenu.marginBottom,                                sc->skinMenu.fillV,                                sc->skinMenu.fillH                            );        cairo_destroy(cr);    }    iPosY = sc->skinMenu.marginTop;    for (i = 0; i < utarray_len(&menu->menushell->shell); i++) {        if (GetMenuItem(menu->menushell, i)->type == MENUTYPE_SIMPLE || GetMenuItem(menu->menushell, i)->type == MENUTYPE_SUBMENU) {            DisplayText(menu, i, iPosY, fontheight);            if (menu->menushell->mark == i)                MenuMark(menu, iPosY, i);            if (GetMenuItem(menu->menushell, i)->type == MENUTYPE_SUBMENU)                DrawArrow(menu, iPosY);            iPosY = iPosY + 6 + fontheight;        } else if (GetMenuItem(menu->menushell, i)->type == MENUTYPE_DIVLINE) {            DrawDivLine(menu, iPosY);            iPosY += 5;        }    }    XResizeWindow(dpy, menu->menuWindow, menu->width, menu->height);    _CAIRO_SETSIZE(menu->menu_x_cs, menu->width, menu->height);    cairo_t* c = cairo_create(menu->menu_x_cs);    cairo_set_operator(c, CAIRO_OPERATOR_SOURCE);    cairo_set_source_surface(c, menu->menu_cs, 0, 0);    cairo_rectangle(c, 0, 0, menu->width, menu->height);    cairo_clip(c);    cairo_paint(c);    cairo_destroy(c);    cairo_surface_flush(menu->menu_x_cs);    XFreeGC(dpy, gc);}
开发者ID:adaptee,项目名称:fcitx,代码行数:60,


示例16: DrawArrow

// Draw this arrow using Arrow::k_activeColor if selectedIdentifier// matches this arrow's identifier.  If this arrow isn't selected// it's drawn using Arrow::k_passiveColor.void Arrow::Draw(const uint32 selectedIdentifier) const{	b2Vec2 position;	DrawArrow(selectedIdentifier == m_identifier ?			  Arrow::k_activeColor : Arrow::k_passiveColor,			  m_angle, CalculateScale(),			  *CalculateViewportPosition(&position));}
开发者ID:383530895,项目名称:liquidfun,代码行数:11,


示例17: glDisable

void NaDbOneAxis::DefineDisplay(){	glDisable(GL_LIGHTING);	glDisable(GL_COLOR_MATERIAL);	glDisable(GL_DEPTH_TEST);	glColor3ub(itsRed, itsGreen, itsBlue);	DrawArrow(itsAxis);}
开发者ID:cybaj,项目名称:NAK,代码行数:9,


示例18: GetClientRect

void CComboBoxExt::DrawCombo(enTypeShow enShow,CGDI* pDC){    CRect m_rcClient;	CRect m_rcDropDown;	GetClientRect(&m_rcClient);	CGradient M(CSize(m_rcClient.Width(),m_rcClient.Height()));		M.PrepareVertical(pDC);	M.Draw(pDC,0,0,0,0,m_rcClient.Width(),m_rcClient.Height(),SRCCOPY);	m_rcClient.bottom-=2;	m_rcClient.DeflateRect(1,1);	if (enShow==CM_NORMAL)		pDC->Draw3dRect(&m_rcClient,CDrawLayer::GetRGBColorWhite(),CDrawLayer::GetRGBColorWhite());	else // && !XP		pDC->Draw3dRect(&m_rcClient,CDrawLayer::GetRGBMenu(),CDrawLayer::GetRGBMenu());	//debemos pintar el borde del boton drawDwon	m_rcClient.DeflateRect(1,1);	m_rcClient.left=m_rcClient.right-m_iWidthDrowDown;	m_rcClient.DeflateRect(1,1);	if (enShow!=CM_NORMAL)		pDC->Draw3dRect(&m_rcClient,CDrawLayer::GetRGBFondoXP(),CDrawLayer::GetRGBFondoXP());	m_rcClient.InflateRect(0,1);	if (enShow==CM_NORMAL)	{		//el boton no esta seleccionado		m_rcClient.left += 2;		m_rcClient.right+= 2;		DrawArrow(pDC,m_rcClient);	}	else	{		m_rcClient.InflateRect(1,1);		CBrush cblu;		cblu.CreateSolidBrush(enShow == CM_ONFOCUS? CDrawLayer::GetRGBFondoXP():CDrawLayer::GetRGBPressBXP());		pDC->FillRect(&m_rcClient,&cblu);		m_rcClient.right += 1;		pDC->Draw3dRect(&m_rcClient,CDrawLayer::GetRGBMenu(),CDrawLayer::GetRGBMenu());		DrawArrow(pDC,m_rcClient);		cblu.DeleteObject();	}	}
开发者ID:weimingtom,项目名称:swc,代码行数:44,


示例19: assertReadEnabled

Adesk::Boolean GasPumpGEDraw::subWorldDraw( AcGiWorldDraw* mode ){	assertReadEnabled () ;	AcGeVector3d v = m_endPt - m_startPt;	v.normalize();	// 绘制箭头	DrawArrow( mode, m_startPt - v * 0.5 * m_radius, m_angle, 2*0.8660254037844386 * m_radius, 1.5 * m_radius * 0.9 );	DrawCircle( mode, m_startPt, m_radius, false );		AcGePoint3d spt,ept;	spt = m_startPt - v * 0.5 * m_radius + v * 1.5 * m_radius * 0.9;	ept = m_startPt - v * 0.5 * m_radius + v * 1.5 * m_radius;	DrawArrow( mode, spt, m_angle, 2*0.8660254037844386 * m_radius * 0.09, 1.5 * m_radius * 0.1 );	update();	return Adesk::kTrue;}
开发者ID:wyrover,项目名称:GDES,代码行数:19,


示例20: GetItem

//***************************************************************************void CGuiHeaderCtrl::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct){	CDC		*pDC	=	CDC::FromHandle(lpDrawItemStruct->hDC);	CRect	rcitem	=	lpDrawItemStruct->rcItem;	UINT	uState	=	lpDrawItemStruct->itemState;	int     nItemID =   lpDrawItemStruct->itemID;	CBrush	m_brush;	CString m_caption;	CSize	siImg=CSize(0,0);	TCHAR caption[256];	IMAGEINFO pImageInfo;	int OldMode=pDC->SetBkMode(TRANSPARENT);	m_brush.CreateSysColorBrush(COLOR_3DFACE);	pDC->FillRect(rcitem,&m_brush);	HDITEM hdi;	hdi.mask = HDI_TEXT | HDI_FORMAT|HDI_IMAGE| HDI_ORDER;	hdi.pszText = caption;	hdi.cchTextMax = 255;	GetItem( nItemID, &hdi );	//---------------------------------------------------------	//se mueve la imagen para dar la sensacion	//de seleccion del item	//---------------------------------------------------------	if (uState == ODS_SELECTED) 	{		rcitem.left+=1;		rcitem.top+=1;	}	if (m_nNumbottomSelect==nItemID)	{		DrawArrow(pDC,rcitem,m_bSentido);		rcitem.right-=12;	}		if (hdi.iImage > -1)	{		m_img.GetImageInfo(hdi.iImage,&pImageInfo);		CRect rcima =pImageInfo.rcImage;		siImg=CSize(rcima.Width(),rcima.Height());		CPoint pti(rcitem.left+2,rcitem.top+1);		m_img.Draw(pDC, hdi.iImage, pti, ILD_TRANSPARENT);	}	if (lstrlen(caption) > 0)		{			CRect m_rctext=rcitem;			m_rctext.left+=siImg.cx+4;			m_rctext.bottom-=2;			DrawTextExt(caption,pDC,&m_rctext,DT_SINGLELINE|DT_BOTTOM);					}	pDC->SetBkMode(OldMode);	}
开发者ID:ZhaoboMeng,项目名称:k-line-print,代码行数:56,


示例21: DrawForce

void DrawForce(NxActor* actor, NxVec3& forceVec, const NxVec3& color){	// Draw only if the force is large enough	NxReal force = forceVec.magnitude();	if (force < 0.1f)  return;	forceVec = 3*forceVec/force;	NxVec3 pos = actor->getCMassGlobalPosition();	DrawArrow(pos, pos + forceVec, color);}
开发者ID:daher-alfawares,项目名称:xr.desktop,代码行数:11,


示例22: DrawBtn

void CFWL_WidgetTP::DrawArrowBtn(CFX_Graphics* pGraphics,                                 const CFX_RectF* pRect,                                 FWLTHEME_DIRECTION eDict,                                 FWLTHEME_STATE eState,                                 CFX_Matrix* pMatrix) {  DrawBtn(pGraphics, pRect, eState, pMatrix);  InitializeArrowColorData();  DrawArrow(pGraphics, pRect, eDict, m_pColorData->clrSign[eState - 1],            pMatrix);}
开发者ID:MIPS,项目名称:external-pdfium,代码行数:11,


示例23: DrawBothArrows

void DrawBothArrows(cairo_t* cr, nux::color::RedGreenBlue const& rgb, int width, int height){  int const arrow_width = 5;  int const arrow_height = 3;  float const trans_height = 8.5;  float const offset_x = 0.5;  // Top  cairo_save(cr);  cairo_translate(cr, width/2 + offset_x, trans_height);  cairo_rotate(cr, G_PI);  DrawArrow(cr, rgb, offset_x, 0, arrow_width, arrow_height);  cairo_restore(cr);  // Bottom  cairo_save(cr);  cairo_translate(cr, width/2 + offset_x, height - trans_height);  cairo_rotate(cr, 0);  DrawArrow(cr, rgb, -offset_x, 0, arrow_width, arrow_height);  cairo_restore(cr);}
开发者ID:jonjahren,项目名称:unity,代码行数:21,


示例24: GetWidth

    /*****************************************************************************    * Function - Redraw    * DESCRIPTION:    * Redraws this element. If it fails (for some reason) the    * method returns false.    *****************************************************************************/    bool ScrollBar::Redraw()    {      bool return_value;      if (IsVisible())      {        // Draw the scrollbar        const U16 y2 = (mShowArrows ? GetWidth() - 1 : 1);        const U16 slider_area_height = GetSliderAreaSize() - mSliderSize + (mShowArrows ? - 2 : -4);        U16 pos = 0;        if ((mMaxPos - mMinPos) > 0)        {          pos = y2 + 1 + (((U32)slider_area_height) * mCurPos / (mMaxPos - mMinPos));          mpSliderFrame->SetClientArea(2, pos, GetWidth() - 3, pos + mSliderSize - 1);          mpSliderFrame->SetVisible();        }        else        {          mpSliderFrame->SetVisible(false);        }        Frame::Redraw();        if (mShowArrows)        {          int width = GetWidth() - 1;          int height = width - 2;          DrawArrow(1, height + 1, height, width, true);          DrawArrow(1, GetHeight() - 2 - height, height, width, false);        }        return_value = true;      }      else      {        return_value = false;        Frame::Redraw();      }      return return_value;    }
开发者ID:Strongc,项目名称:DC_source,代码行数:45,


示例25: DrawBorder

void CHSScrollBar::Draw( CDC* pDC ){	if (m_rect.IsRectEmpty())	{		return;	}	pDC->FillSolidRect(&m_rect, m_clrBK);	DrawBorder(pDC);	DrawArrow(pDC);	DrawBlock(pDC);}
开发者ID:hefen1,项目名称:XCaimi,代码行数:13,


示例26: cs

voidDropDownList::Refresh(PaintEventArgs&& e){    const auto cs(GetCursorState());    if(FetchContainerPtr(lbContent))        csCurrent = CursorState::Pressed;    Button::Refresh(std::move(e));    csCurrent = cs;    // XXX: Conversion to 'SPos' might be implementation-defined.    DrawArrow(e.Target, e.ClipArea, Rect(e.Location.X + SPos(GetWidth()) - 16,                                         e.Location.Y, Size(16, GetHeight())), 4, RDeg270, ForeColor);}
开发者ID:coldzhang,项目名称:YSLib,代码行数:13,


示例27: DrawBtn

void CFWL_WidgetTP::DrawArrowBtn(CFX_Graphics* pGraphics,                                 const CFX_RectF* pRect,                                 FWLTHEME_DIRECTION eDict,                                 FWLTHEME_STATE eState,                                 CFX_Matrix* pMatrix) {  DrawBtn(pGraphics, pRect, eState, pMatrix);  if (!CFWL_ArrowData::IsInstance()) {    CFWL_ArrowData::GetInstance()->SetColorData(FWL_GetThemeColor(m_dwThemeID));  }  CFWL_ArrowData::CColorData* pColorData =      CFWL_ArrowData::GetInstance()->m_pColorData;  DrawArrow(pGraphics, pRect, eDict, pColorData->clrSign[eState - 1], pMatrix);}
开发者ID:JinAirsOs,项目名称:pdfium,代码行数:13,


示例28: GetItemRect

//***************************************************************************BOOL CHeaderView::DrawItem(HDITEM hdi,CGDI* pDC){	CRect	rcitem;	CSize	siImg=CSize(0,0);	IMAGEINFO pImageInfo;	int OldMode=pDC->SetBkMode(TRANSPARENT);	GetItemRect(hdi.iOrder, rcitem);	HFONT m_fontOldBold;	HFONT m_fontOld;	(void)m_fontOldBold;	(void)m_fontOld;	//---------------------------------------------------------	//se mueve la imagen para dar la sensacion	//de seleccion del item	//---------------------------------------------------------	if (m_nNumbottomSelect==hdi.iOrder)	{		DrawArrow(pDC,rcitem,m_bSentido);		rcitem.right-=12;	}		if (hdi.iImage > -1)	{		m_img.GetImageInfo(hdi.iImage,&pImageInfo);		CRect rcima =pImageInfo.rcImage;		siImg=CSize(rcima.Width(),rcima.Height());		CPoint pti(rcitem.left+2,rcitem.top+1);		m_img.Draw( hdi.iImage,pDC->m_hDC, pti, ILD_TRANSPARENT);	}		if (hdi.cchTextMax > 0)		{						CRect m_rctext=rcitem;			m_rctext.left+=siImg.cx+4;			m_rctext.bottom-=2;			if (m_bMouserOver && m_selected==hdi.iOrder)				m_fontOldBold=pDC->SelectFont(m_cfontBold);			else				m_fontOld=pDC->SelectFont(m_cfontNormal);			DrawTextExt(hdi.pszText,pDC,&rcitem);		}			pDC->SetBkMode(OldMode);	return TRUE;	}
开发者ID:weimingtom,项目名称:swc,代码行数:51,



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


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