48 float fLeft = kDefaultPosition;
49 float fBottom = kDefaultPosition;
51 return {fLeft, fBottom};
53 RetainPtr<
const CPDF_Array> pA = m_pDict->GetArrayFor(
"A");
55 return {fLeft, fBottom};
57 size_t dwCount = pA->size();
59 fLeft = pA->GetFloatAt(0);
61 fBottom = pA->GetFloatAt(1);
62 return {fLeft, fBottom};
86 const float fPlateWidth = rcPlate
.Width();
87 const float fPlateHeight = rcPlate
.Height();
88 const float fImageWidth = image_size.width;
89 const float fImageHeight = image_size.height;
92 fHScale = fPlateWidth /
std::max(fImageWidth, 1.0f);
93 fVScale = fPlateHeight /
std::max(fImageHeight, 1.0f);
96 if (fPlateWidth < fImageWidth)
97 fHScale = fPlateWidth /
std::max(fImageWidth, 1.0f);
98 if (fPlateHeight < fImageHeight)
99 fVScale = fPlateHeight /
std::max(fImageHeight, 1.0f);
102 if (fPlateWidth > fImageWidth)
103 fHScale = fPlateWidth /
std::max(fImageWidth, 1.0f);
104 if (fPlateHeight > fImageHeight)
105 fVScale = fPlateHeight /
std::max(fImageHeight, 1.0f);
112 float min_scale =
std::min(fHScale, fVScale);
116 return {fHScale, fVScale};
120 const CFX_VectorF& scale,
122 const CFX_PointF icon_position = GetIconPosition();
123 const float fImageFactWidth = image_size.width * scale.x;
124 const float fImageFactHeight = image_size.height * scale.y;
125 return {(rcPlate
.Width() - fImageFactWidth) * icon_position.x,
126 (rcPlate
.Height() - fImageFactHeight) * icon_position.y};