本文整理汇总了C++中CPDF_Rect::Width方法的典型用法代码示例。如果您正苦于以下问题:C++ CPDF_Rect::Width方法的具体用法?C++ CPDF_Rect::Width怎么用?C++ CPDF_Rect::Width使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPDF_Rect
的用法示例。
在下文中一共展示了CPDF_Rect::Width方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetMatrix
CFX_AffineMatrix GetMatrix(CPDF_Rect rcAnnot, CPDF_Rect rcStream, CFX_AffineMatrix matrix)
{
if(rcStream.IsEmpty())
return CFX_AffineMatrix();
matrix.TransformRect(rcStream);
rcStream.Normalize();
FX_FLOAT a = rcAnnot.Width()/rcStream.Width();
FX_FLOAT d = rcAnnot.Height()/rcStream.Height();
FX_FLOAT e = rcAnnot.left - rcStream.left * a;
FX_FLOAT f = rcAnnot.bottom - rcStream.bottom * d;
return CFX_AffineMatrix(a, 0, 0, d, e, f);
}
示例2: GetCharArrayAutoFontSize
FX_FLOAT CPWL_Edit::GetCharArrayAutoFontSize(CPDF_Font* pFont,
const CPDF_Rect& rcPlate,
int32_t nCharArray) {
if (pFont && !pFont->IsStandardFont()) {
FX_RECT rcBBox;
pFont->GetFontBBox(rcBBox);
CPDF_Rect rcCell = rcPlate;
FX_FLOAT xdiv = rcCell.Width() / nCharArray * 1000.0f / rcBBox.Width();
FX_FLOAT ydiv = -rcCell.Height() * 1000.0f / rcBBox.Height();
return xdiv < ydiv ? xdiv : ydiv;
}
return 0.0f;
}
示例3: DrawThisAppearance
void CPWL_Note_RBBox::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device)
{
CPDF_Rect rcClient = this->GetClientRect();
CFX_GraphStateData gsd;
gsd.m_LineWidth = 1.0f;
CFX_PathData pathCross;
pathCross.SetPointCount(4);
pathCross.SetPoint(0, rcClient.right, rcClient.top, FXPT_MOVETO);
pathCross.SetPoint(1, rcClient.left, rcClient.bottom, FXPT_LINETO);
pathCross.SetPoint(2, rcClient.right, rcClient.bottom + rcClient.Height() * 0.5f, FXPT_MOVETO);
pathCross.SetPoint(3, rcClient.left + rcClient.Width() * 0.5f, rcClient.bottom, FXPT_LINETO);
pDevice->DrawPath(&pathCross, pUser2Device, &gsd,
0, CPWL_Utils::PWLColorToFXColor(GetTextColor(),this->GetTransparency()), FXFILL_ALTERNATE);
}
示例4: RePosChildWnd
void CPWL_Note_Options::RePosChildWnd()
{
if (this->IsValid())
{
ASSERT(m_pText != NULL);
CPDF_Rect rcClient = GetClientRect();
if (rcClient.Width() > 15.0f)
{
rcClient.right -= 15.0f;
m_pText->Move(rcClient, TRUE, FALSE);
m_pText->SetVisible(TRUE);
}
else
{
m_pText->Move(CPDF_Rect(0,0,0,0), TRUE, FALSE);
m_pText->SetVisible(FALSE);
}
}
}