本文整理匯總了C++中DrawImage函數的典型用法代碼示例。如果您正苦於以下問題:C++ DrawImage函數的具體用法?C++ DrawImage怎麽用?C++ DrawImage使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了DrawImage函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: SetViewMatrix
void GuiLabel::Render(const TMatrix4x4f& pViewMatrix)
{
SetViewMatrix(pViewMatrix*GetAdjMatrix());
DrawImage(tImgFone, GetVertexObj(), GetStdTextureObj(), cColor);
sCaption.Render(*this,pViewMatrix);
GuiEnControl::Render(pViewMatrix);
}
示例2: SPADES_MARK_FUNCTION
void AsyncRenderer::DrawImage(client::IImage *image, const spades::AABB2 &outRect) {
SPADES_MARK_FUNCTION();
DrawImage(image,
outRect,
AABB2(0, 0,
image->GetWidth(),
image->GetHeight()));
}
示例3: DrawImage
void CSkinUnitODL::DrawImage(Gdiplus::Graphics& gcDrawer, Gdiplus::RectF rtDrawArea, Gdiplus::REAL fScale)
{
if (m_imgSkin)
{
Gdiplus::GraphicsPath gcPath;
gcPath.AddRectangle(rtDrawArea);
DrawImage(gcDrawer, gcPath, Gdiplus::PointF(rtDrawArea.X,rtDrawArea.Y), fScale);
}
}
示例4: DrawImage
void Costix::Draw()
{
DrawImage();
FilterBlocks();
WriteResultBitmap();
//exit(-1);
}
示例5: Splash
//Splash screen
void Splash() {
ResetTimer(); //we're going to use it for random seed
//Setup a world with a tank and a pyramid in specific places
CloseGraphics();
OpenGraphics();
Point3d centre;
world=CreateNewWorld();
//A tank pointing straight at us
centre=CreatePoint(0.0,0.0,45.0);
obj=CreateTank(GREEN, centre, 4.5);
RotateObjectYAxis(&obj, 2.0 * PI / 360.0 * 195);
AddObjectToWorld(&world, obj);
//A yellow pyramid behind the tank and to the right
centre=CreatePoint(10.0, 0.0, 70.0);
obj=CreatePyramid(YELLOW, centre, 5.0);
RotateObjectYAxis(&obj, 3.0*PI/5.0);
AddObjectToWorld(&world, obj);
//A blue cube behind the tank and to the left
centre=CreatePoint(-10.0, 0.0, 60.0);
obj=CreateCube(BLUE, centre, 5.0);
RotateObjectYAxis(&obj, 195.0*PI/180.0);
AddObjectToWorld(&world,obj);
//Draw world, add splash graphics, prompt to start
cameraPos=CreatePoint(0.0,5.0,0.0);
cameraAngle=CreatePoint(0.0,0.0,0.0);
DrawWorld(&world, cameraPos, cameraAngle);
SetTextColor(GREEN);
DrawText(5,25, "by RorschachUK");
SetTextColor(CYAN);
DrawText(5,100, "Help");
DrawText(110,100,"Start");
DrawImage(logoImage, 5,5,RGBColor(253,255,252,0));
DrawImage(signatureImage, 135,24,BLACK);
Show();
Sleep(100);
mode=0;
}
示例6: THuiRealRect
EXPORT_C void CHuiCanvasGc::DrawImage(const CHuiTexture& aImage, const THuiRealRect& aDestinationRect)
{
if (!iGc)
{
return;
}
THuiRealRect srcRect = THuiRealRect(TPoint(0,0), aImage.Size() );
DrawImage(aImage, aDestinationRect, srcRect);
}
示例7: GetImageFromRect
void MythPainter::DrawEllipse(const QRect &area, const QBrush &fillBrush,
const QPen &linePen, int alpha)
{
MythImage *im = GetImageFromRect(area, 0, 1, fillBrush, linePen);
if (im)
{
DrawImage(area.x(), area.y(), im, alpha);
im->DecrRef();
}
}
示例8: ImageSDL
Image* WindowSDL::CreateImage(const void* memory, Int size) const
{
auto src = new ImageSDL(memory, size, _renderer);
auto img = new ImageSDL(src->Width(), src->Height(), _renderer); //Create with SDL_TEXTUREACCESS_TARGET to make it writable
img->DrawImage({}, src);
delete src;
return img;
}
示例9: if
void CEditUI::PaintStatusImage(HDC hDC)
{
if( IsFocused() ) m_uButtonState |= UISTATE_FOCUSED;
else m_uButtonState &= ~ UISTATE_FOCUSED;
if( !IsEnabled() ) m_uButtonState |= UISTATE_DISABLED;
else m_uButtonState &= ~ UISTATE_DISABLED;
if( (m_uButtonState & UISTATE_DISABLED) != 0 ) {
if( DrawImage(hDC, m_diDisabled) ) return;
}
else if( (m_uButtonState & UISTATE_FOCUSED) != 0 ) {
if( DrawImage(hDC, m_diFocused) ) return;
}
else if( (m_uButtonState & UISTATE_HOT) != 0 ) {
if( DrawImage(hDC, m_diHot) ) return;
}
if( DrawImage(hDC, m_diNormal) ) return;
}
示例10: GetImageFromRect
void MythQImagePainter::DrawRoundRect(const QRect &area, int radius,
bool drawFill, const QColor &fillColor,
bool drawLine, int lineWidth,
const QColor &lineColor)
{
MythImage *im = GetImageFromRect(area.size(), radius, drawFill, fillColor,
drawLine, lineWidth, lineColor);
if (im)
DrawImage(area, im, QRect(0, 0, area.width(), area.height()), 255);
}
示例11: CLAMP
void C2DRenderUtils::RenderTest_Textures( float fTime, const ColorF& color )
{
int textureID = m_white_texture->GetTextureID();
float sx = 50.0f;
float sy = 50.0f;
ColorF renderCol = color;
renderCol.r = CLAMP(renderCol.r, renderCol.r, renderCol.r+0.5f);
renderCol.a *= 0.5f;
DrawQuad( 0.f, 0.f, sx, sy, renderCol );
DrawImage( textureID, 0.f, 0.f, sx, sy, 0.0f, color, 0.0f, 1.0f, 1.0f, 0.0f );
DrawQuad( m_pLayoutManager->GetVirtualWidth()-sx, 0.f, sx, sy, renderCol );
DrawImage( textureID, m_pLayoutManager->GetVirtualWidth()-sx, 0.f, sx, sy, 0.0f, color );
DrawQuad( m_pLayoutManager->GetVirtualWidth()-sx, m_pLayoutManager->GetVirtualHeight()-sy, sx, sy, renderCol );
DrawImage( textureID, m_pLayoutManager->GetVirtualWidth()-sx, m_pLayoutManager->GetVirtualHeight()-sy, sx, sy, 0.0f, color );
DrawQuad( 0.f, m_pLayoutManager->GetVirtualHeight()-sy, sx, sy, renderCol );
DrawImage( textureID, 0.f, m_pLayoutManager->GetVirtualHeight()-sy, sx, sy, 0.0f, color );
}
示例12: DrawImage
bool cReelLogoCache::DrawEventImage(const cEvent *Event, int x, int y, int w, int h, int c, cBitmap *bmp)
{
if (Event == NULL || bmp == NULL)
return false;
std::stringstream strFilename;
strFilename << ReelConfig.GetImagesDir() << '/' << Event->EventID() << '.' << ReelConfig.GetImageExtension();
int rc = DrawImage(strFilename.str().c_str(), x, y, w, h, c, bmp);
return rc;
}
示例13: if
void CCheckBoxUI::PaintStatusImage(HDC hDC)
{
//m_uButtonState &= ~UISTATE_PUSHED;
if (IsSelected())
{
if((m_uButtonState & UISTATE_PUSHED) != 0 && m_sSelectedPushedImage)
{
if (!DrawImage(hDC, *m_sSelectedPushedImage.get())) m_sSelectedPushedImage.reset();
else goto Label_ForeImage;
}
else if ((m_uButtonState & UISTATE_HOT) != 0 && m_sSelectedHotImage)
{
if (!DrawImage(hDC, *m_sSelectedHotImage.get())) m_sSelectedHotImage.reset();
else goto Label_ForeImage;
}
else if (!IsEnabled() && m_sSelectedDisabledImage)
{
if (!DrawImage(hDC, *m_sSelectedDisabledImage.get())) m_sSelectedDisabledImage.reset();
else goto Label_ForeImage;
}
else
{
if (m_sSelectedImage) {
if (!DrawImage(hDC, *m_sSelectedImage.get())) m_sSelectedImage.reset();
else goto Label_ForeImage;
}
else if (m_dwSelectedBkColor != 0) {
CRenderEngine::DrawColor(hDC, m_rcPaint, m_dwSelectedBkColor);
return;
}
}
}
CButtonUI::PaintStatusImage(hDC);
Label_ForeImage:
if (m_sForeImage)
{
if (!DrawImage(hDC, *m_sForeImage.get())) m_sForeImage.reset();
}
}
示例14: if
void CComboBoxUI::PaintStatusImage(HDC hDC)
{
if (m_sArrowImage.IsEmpty())
CComboUI::PaintStatusImage(hDC);
else
{
// get index
if( IsFocused() ) m_uButtonState |= UISTATE_FOCUSED;
else m_uButtonState &= ~ UISTATE_FOCUSED;
if( !IsEnabled() ) m_uButtonState |= UISTATE_DISABLED;
else m_uButtonState &= ~ UISTATE_DISABLED;
int nIndex = 0;
if ((m_uButtonState & UISTATE_DISABLED) != 0)
nIndex = 4;
else if ((m_uButtonState & UISTATE_PUSHED) != 0)
nIndex = 2;
else if ((m_uButtonState & UISTATE_HOT) != 0)
nIndex = 1;
else if ((m_uButtonState & UISTATE_FOCUSED) != 0)
nIndex = 3;
CDuiRect rcBmpPart(m_sArrowImage.GetSource());
m_nArrowWidth = rcBmpPart.GetWidth() / 5;
rcBmpPart.left += nIndex * m_nArrowWidth;
rcBmpPart.right = rcBmpPart.left + m_nArrowWidth;
CDuiRect rcDest(0, 0, m_rcItem.right - m_rcItem.left, m_rcItem.bottom - m_rcItem.top);
rcDest.Deflate(GetBorderSize(), GetBorderSize());
rcDest.left = rcDest.right - m_nArrowWidth;
// draw image
if (!DrawImage(hDC, m_sArrowImage))
m_sNormalImage.Empty();
else
{
DrawImage(hDC, m_sArrowImage,rcBmpPart);
DrawImage(hDC, m_sArrowImage,rcDest);
}
}
}
示例15: UI_ResetCursorPos
void UI_ResetCursorPos(void)
{
TFT_Set_Pen(MainScreen.Color, 0);
TFT_Set_Brush(1, MainScreen.Color, 0, LEFT_TO_RIGHT, CL_WHITE, CL_WHITE);
TFT_Rectangle(Image3.Left, Image3.Top, (Image3.Left+Image3.Width), (Image3.Top+Image3.Height));
Image3.Left = 10;
Image3.Top = 28;
DrawImage(&Image3);
cursorPos = 0;
filesListOffset = 0;
}