本文整理汇总了C++中TRect::Height方法的典型用法代码示例。如果您正苦于以下问题:C++ TRect::Height方法的具体用法?C++ TRect::Height怎么用?C++ TRect::Height使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TRect
的用法示例。
在下文中一共展示了TRect::Height方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Draw
void CConeBackgroundTestParentWindowOwning::Draw(const TRect& aRect) const
{
CWindowGc& aGc = SystemGc();
aGc.SetBrushStyle(CGraphicsContext::ERearwardDiagonalHatchBrush);
aGc.SetPenStyle(CGraphicsContext::ENullPen);
TRect tlRect = aRect;
tlRect.iBr.iX = (tlRect.iBr.iX - tlRect.iTl.iX)/2 + tlRect.iTl.iX;
tlRect.iBr.iY = (tlRect.iBr.iY - tlRect.iTl.iY)/2 + tlRect.iTl.iY;
aGc.SetBrushColor(TRgb(0xff0000)); //blue, to be changed or removed
aGc.DrawRect(tlRect);
TRect brRect = tlRect;
brRect.Move(tlRect.Width(), tlRect.Height());
aGc.SetBrushColor(TRgb(0xffffff)); //white , to be changed or removed
aGc.DrawRect(brRect);
}
示例2: result
glyph_metrics_t QFontEngineS60::boundingBox_const(glyph_t glyph) const
{
TOpenFontCharMetrics metrics;
const TUint8 *glyphBitmapBytes;
TSize glyphBitmapSize;
getCharacterData(glyph, metrics, glyphBitmapBytes, glyphBitmapSize);
TRect glyphBounds;
metrics.GetHorizBounds(glyphBounds);
const glyph_metrics_t result(
glyphBounds.iTl.iX,
glyphBounds.iTl.iY,
glyphBounds.Width(),
glyphBounds.Height(),
metrics.HorizAdvance(),
0
);
return result;
}
示例3:
/**
Draw function of CConeBackgroundTestDrawer2 class used to draw the control.\n
Sets the brush style to Solid Brush and Pen Style to Null Pen.\n
Sets the brush colour to Red and paints the top left part of the control.\n
Sets the brush colour and points the bottom right part of the control.\n
*/
void CConeBackgroundTestDrawer1::Draw(CWindowGc& aGc, const CCoeControl& /*aControl*/, const TRect& aRect) const
{
aGc.SetBrushStyle(CGraphicsContext::ESolidBrush);
aGc.SetPenStyle(CGraphicsContext::ENullPen);
TRect tlRect = aRect;
tlRect.iBr.iX = (tlRect.iBr.iX - tlRect.iTl.iX)/2 + tlRect.iTl.iX;
tlRect.iBr.iY = (tlRect.iBr.iY - tlRect.iTl.iY)/2 + tlRect.iTl.iY;
aGc.SetBrushColor(TRgb(0xff0000));
aGc.DrawRect(tlRect);
TRect brRect = tlRect;
brRect.Move(tlRect.Width(), tlRect.Height());
aGc.SetBrushColor(TRgb(0x00ff00));
aGc.DrawRect(brRect);
}
示例4: BitBlt
// -----------------------------------------------------------------------------
// CMaskedBitmap::BitBlt
// -----------------------------------------------------------------------------
void CMaskedBitmap::BitBlt( CFbsBitGc& aContext, const TPoint& aPoint, const TRect& aSource ) const
{
if (!(aSource.Width()>0 && aSource.Height()>0))
{
return;
}
if( iBitmap->Handle() )
{
if( iMask->Handle() )
{
aContext.BitBltMasked( aPoint, iBitmap, aSource, iMask, iInvertMask );
}
else
{
aContext.BitBlt( aPoint, iBitmap, aSource );
}
}
}
示例5: PintaIdentificador
void PintaIdentificador(CBitmap *BImgDest, TRect &ARect, int **MatrizGrupos)
{
int x, y;
int xIni, xFim, yIni, yFim;
int larg, alt;
Cor *CorTemp;
Cor **ImgDest=BImgDest->PMCor;
larg=ARect.Width();
alt=ARect.Height();
for (y=0; y<alt; y++)
for (x=0; x<larg; x++)
{
CorTemp=&(ImgDest[y+ARect.Top][x+ARect.Left]);
if (MatrizGrupos[y][x]==PIXEL_ACEITO)
CorTemp->SetCyan();
else if (MatrizGrupos[y][x]==PIXEL_NAO_ACEITO)
CorTemp->SetAzul();
}
}
示例6: OnWindowCloseL
/**
Handles the window close event
@param aWindow The closing window.
*/
void CTestRenderStage::OnWindowCloseL(MWsWindow* aWindow)
{
TPoint origin = aWindow->Origin();
TRect absRect = aWindow->AbsRect();
TSize size = aWindow->Size();
TUint32 handle = aWindow->Handle();
CLogFile* log = CLogFile::NewL();
CleanupStack::PushL(log);
TBuf<255> print(_L(""));
log->WriteToLogL(print);
print.Format(_L("Closing Window Handle %d - Origin: %d, %d"), handle, origin.iX, origin.iY);
log->WriteToLogL(print);
print.Format(_L("Closing Window Handle %d - AbsRec: Height %d, Width %d"), handle, absRect.Height(), absRect.Width());
log->WriteToLogL(print);
print.Format(_L("Closing Window Handle %d - Size: Height %d, Width %d"), handle, size.iHeight, size.iWidth);
log->WriteToLogL(print);
CleanupStack::PopAndDestroy(log);
}
示例7: HideLines
/**
* Hides the specified form line, if it does not fit to the specified clipping rectangle.
* The function never hides focused editable lines. If the form layout is single, the whole
* captioned control is hidden.
*
* @param aControl The form line to be hidden
* @param aClipRect The clipping rectangle
*
* @return How many subcontrols remained visible
*/
static TInt HideLines(CEikCaptionedControl *aControl, TRect aClipRect)
{
TInt visibleCtrls = 3; // Visible subcontrols after hiding
CEikCaptionedControl *currentdLine = aControl->DialogPage()->CurrentLine();
if( ( aControl == currentdLine ) && aControl->iIsEditable )
{
return visibleCtrls;
}
TBool isEdwin = aControl->ControlIsAnEdwin(aControl->iControlType);
CEikEdwin* edwin( NULL );
if( isEdwin )
edwin = (CEikEdwin*)aControl->iControl;
TRect ctrlRect( aControl->iControl->Rect() );
if( isEdwin )
{
// Adjust rectangle only to the first line (with edwin's top margin)
TRect textFirstLine;
edwin->TextLayout()->GetLineRect(ctrlRect.iTl.iY, textFirstLine);
ctrlRect.iBr.iY = ctrlRect.iTl.iY + edwin->Margins().iTop + textFirstLine.Height();
}
// Find the minimal clipping rectangle
if( aControl->iBitmap )
GetVertMinRect( aClipRect, aControl->iBitmap->Rect() );
if( aControl->iCaption )
GetVertMinRect( aClipRect, aControl->iCaption->Rect() );
GetVertMinRect( aClipRect, ctrlRect );
// Try to hide all controls on the current line
aControl->SetPartiallyVisible( ETrue );
visibleCtrls -= HideLines_Ctrl( aControl->iBitmap, aClipRect );
visibleCtrls -= HideLines_Ctrl( aControl->iCaption, aClipRect );
if( isEdwin )
visibleCtrls -= HideLines_Edwin( edwin, aClipRect );
else
visibleCtrls -= HideLines_Ctrl( aControl->iControl, aClipRect );
return visibleCtrls;
}
示例8: DrawImages
/*
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
void CMySplashScreen::DrawImages(CWindowGc& aGc,const TRect& aRect,CGulIcon* aIcon) const
{
if(aIcon)
{
if(aIcon->Bitmap() && aIcon->Mask())
{
if(aIcon->Bitmap()->Handle() && aIcon->Mask()->Handle())
{
TSize ImgSiz(aIcon->Bitmap()->SizeInPixels());
TInt LFtMargin = aRect.iTl.iX + ((aRect.Width() - ImgSiz.iWidth) / 2);
TInt RghMargin = aRect.iTl.iY + ((aRect.Height() - ImgSiz.iHeight) / 2);
TRect DrwRect(LFtMargin,RghMargin,(ImgSiz.iWidth + LFtMargin),(ImgSiz.iHeight + RghMargin));
aGc.DrawBitmapMasked(DrwRect,aIcon->Bitmap(),TRect(0,0,ImgSiz.iWidth,ImgSiz.iHeight),aIcon->Mask(),EFalse);
}
}
}
}
示例9: DrawBitmap
// -----------------------------------------------------------------------------
// CMaskedBitmap::DrawBitmap
// -----------------------------------------------------------------------------
void CMaskedBitmap::DrawBitmap( CFbsBitGc& aContext, const TRect& aTarget ) const
{
TSize s(iBitmap->SizeInPixels());
if (!(aTarget.Width()>0 && aTarget.Height()>0 && s.iWidth>0 && s.iHeight>0))
{
return;
}
if( iBitmap->Handle() )
{
// ### FIXME DrawBitmapMasked is too buggy to use 2.8/week52, so no transparency with scaling
if( iMask->Handle() )
{
aContext.DrawBitmapMasked( aTarget, iBitmap, s, iMask, iInvertMask );
}
else
{
aContext.DrawBitmap( aTarget, iBitmap );
}
}
}
示例10: EvPaint
///////////////////////////////////////////////////////////////
// TLevelProgressDialog
// --------------------
//
void TLevelProgressDialog::EvPaint ()
{
if ( Minimized )
{
TPaintDC dc(*this);
TRect ClientRect;
// Get size of iconic window
GetClientRect(ClientRect);
int Width = ClientRect.Width();
int Height = ClientRect.Height();
DrawIconicGauge (dc, 0,
Width, Height / 3, pNodesGauge->GetValue());
DrawIconicGauge (dc, Height / 3,
Width, Height / 3, pRejectGauge->GetValue());
DrawIconicGauge (dc, 2 * Height / 3,
Width, Height / 3, pBlockmapGauge->GetValue());
}
else
TDialog::EvPaint();
}
示例11: Draw
void COokjorContainer::Draw(const TRect& arect) const
{
CSkinnedContainer::Draw(arect);
if(iBitmap)
{
TRect aRect = Rect();
CWindowGc& gc = SystemGc();
aRect.Width();
TPoint p;
TSize picsz = iBitmap->SizeInPixels();
p.iX = aRect.Width() - picsz.iWidth;
p.iX/=2;
p.iY = aRect.Height() - picsz.iHeight;
p.iY/=2;
gc.BitBlt(p,iBitmap);
}
}
示例12:
void CHuiVg10CanvasGc::DoDrawRects(RArray<THuiRealRect>& aRects)
{
if(iPolygonDrawMode == EHuiNoFill)
{
CHuiCanvasGc::DoDrawRects(aRects);
}
else
{
for(TInt i=0; i<aRects.Count(); i++)
{
TRect roundedRect = aRects[i].Round();
if (roundedRect.Height() > 0 && roundedRect.Width() > 0)
{
CHuiVg10Gc* vg10Gc = (CHuiVg10Gc *)iGc;
vg10Gc->SetPaintPattern(iPolygonFillTexture, iPolygonFillTextureOrigin);
iGc->DrawRect(roundedRect);
vg10Gc->SetPaintPattern(NULL, iPolygonFillTextureOrigin);
}
}
}
}
示例13: ResetJavaRectObject
void CMMADisplay::ResetJavaRectObject(const TRect& aRect)
{
LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::ResetJavaRectObject +");
//TRect rect = aRect;
JNIEnv* validJni = iJni;//iEventSource->getValidJniEnv();//iJni;
/*jmethodID setRectID = validJni->GetMethodID(
iJavaDisplayClass,
"setRect",
"()V");
*/
LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::ResetJavaRectObject --1");
// set the value to java,so that we can access those from array
//jfieldID iRectDimensionField = validJni->GetFieldID(iJavaDisplayClass, "rectDimension", "[I");
if (iRectDimensionField == NULL)
{
// handle error
}
/* Write to the instance fields */
jintArray javaDimensionarr = (jintArray)validJni->GetObjectField(iJavaDisplayObject, iRectDimensionField);
LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::ResetJavaRectObject --2");
jint* nativeRectDimensionArr = validJni->GetIntArrayElements(javaDimensionarr, NULL);
LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::ResetJavaRectObject --3");
if (!nativeRectDimensionArr)
{ // inputBuffer was already allocated
validJni->ReleaseIntArrayElements(javaDimensionarr, nativeRectDimensionArr, JNI_ABORT);
LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::ResetJavaRectObject Error in resetting rect dimension to java");
return;
}
nativeRectDimensionArr[0] = aRect.iTl.iX;
nativeRectDimensionArr[1] = aRect.iTl.iY;;
nativeRectDimensionArr[2] = aRect.Width();
nativeRectDimensionArr[3] = aRect.Height();
// Now the dimension array in java is updated hence reset the java rect
validJni->ReleaseIntArrayElements(javaDimensionarr, nativeRectDimensionArr, 0);
validJni->CallVoidMethod(iJavaDisplayObject,setRectID);
LOG(EJavaMMAPI,EInfo,"MMA::CMMACanvasDisplay::ResetJavaRectObject -");
}
示例14: PaintButton
//
/// Paints a maximize box on the tiny caption bar.
//
void
TTinyCaption::PaintMaxBox(TDC& dc, TRect& boxRect, bool pressed)
{
// Fill the box with light gray & draw bevel if possible
//
PaintButton(dc, boxRect, pressed);
if (pressed)
boxRect.Offset(1,1);
// Down triangle
//
int bh = boxRect.Height();
int bw = boxRect.Width();
if (IsZoomed()) {
TPoint begPt = boxRect.BottomLeft().OffsetBy((bw+1)/4, -bh*3/8);
TPoint endPt = begPt.OffsetBy((bw+1)/2, 0);
while (begPt.x < endPt.x) {
dc.MoveTo(begPt);
dc.LineTo(endPt);
begPt.Offset(1,1);
endPt.Offset(-1,1);
}
}
// Up triangle
//
{
TPoint begPt = boxRect.TopLeft().OffsetBy((bw+1)/4, IsZoomed() ? bh*3/8 : bh*2/3);
TPoint endPt = begPt.OffsetBy((bw+1)/2, 0);
while (begPt.x < endPt.x) {
dc.MoveTo(begPt);
dc.LineTo(endPt);
begPt.Offset(1, -1);
endPt.Offset(-1, -1);
}
}
}
示例15: DrawGrid
void CCalendarManagerContainer::DrawGrid(CWindowGc& gc, const TRect& aRect, const TRgb& p_Default_Grid_Color1) const
{
gc.SetPenColor(p_Default_Grid_Color1);
gc.SetPenSize(TSize(2, 2));
gc.DrawLine(TPoint(0, g_Pos_Y), TPoint(aRect.Width(), g_Pos_Y));
gc.SetPenSize(TSize(1, 1));
TInt i_Pos_X = g_Space_X;
for (TInt i = 0; i < 7; i++)
{
gc.DrawLine(TPoint(i_Pos_X, g_Pos_Y), TPoint(i_Pos_X, aRect.Height()));
i_Pos_X += g_Space_X + 1;
}
g_Pos_Y += 1;
TInt i_Pos_Y = g_Pos_Y;
for (TInt i = 0; i < 6; i++)
{
gc.DrawLine(TPoint(g_Space_X, i_Pos_Y), TPoint(aRect.Width(), i_Pos_Y));
i_Pos_Y += g_Space_Y + 2;
}
}