| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "xfa/fxgraphics/include/cfx_graphics.h" | 7 #include "xfa/fxgraphics/include/cfx_graphics.h" |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 return RenderDeviceFillPath(path, fillMode, matrix); | 824 return RenderDeviceFillPath(path, fillMode, matrix); |
| 825 return FWL_Error::PropertyInvalid; | 825 return FWL_Error::PropertyInvalid; |
| 826 } | 826 } |
| 827 | 827 |
| 828 FWL_Error CFX_Graphics::ClipPath(CFX_Path* path, | 828 FWL_Error CFX_Graphics::ClipPath(CFX_Path* path, |
| 829 FX_FillMode fillMode, | 829 FX_FillMode fillMode, |
| 830 CFX_Matrix* matrix) { | 830 CFX_Matrix* matrix) { |
| 831 if (!path) | 831 if (!path) |
| 832 return FWL_Error::ParameterInvalid; | 832 return FWL_Error::ParameterInvalid; |
| 833 if (m_type == FX_CONTEXT_Device && m_renderDevice) { | 833 if (m_type == FX_CONTEXT_Device && m_renderDevice) { |
| 834 FX_BOOL result = m_renderDevice->SetClip_PathFill( | 834 FX_BOOL result = |
| 835 path->GetPathData(), (CFX_Matrix*)matrix, fillMode); | 835 m_renderDevice->SetClip_PathFill(path->GetPathData(), matrix, fillMode); |
| 836 if (!result) | 836 if (!result) |
| 837 return FWL_Error::Indefinite; | 837 return FWL_Error::Indefinite; |
| 838 return FWL_Error::Succeeded; | 838 return FWL_Error::Succeeded; |
| 839 } | 839 } |
| 840 return FWL_Error::PropertyInvalid; | 840 return FWL_Error::PropertyInvalid; |
| 841 } | 841 } |
| 842 | 842 |
| 843 FWL_Error CFX_Graphics::DrawImage(CFX_DIBSource* source, | 843 FWL_Error CFX_Graphics::DrawImage(CFX_DIBSource* source, |
| 844 const CFX_PointF& point, | 844 const CFX_PointF& point, |
| 845 CFX_Matrix* matrix) { | 845 CFX_Matrix* matrix) { |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1164 if (!m_info.strokeColor) | 1164 if (!m_info.strokeColor) |
| 1165 return FWL_Error::PropertyInvalid; | 1165 return FWL_Error::PropertyInvalid; |
| 1166 CFX_Matrix m; | 1166 CFX_Matrix m; |
| 1167 m.Set(m_info.CTM.a, m_info.CTM.b, m_info.CTM.c, m_info.CTM.d, m_info.CTM.e, | 1167 m.Set(m_info.CTM.a, m_info.CTM.b, m_info.CTM.c, m_info.CTM.d, m_info.CTM.e, |
| 1168 m_info.CTM.f); | 1168 m_info.CTM.f); |
| 1169 if (matrix) { | 1169 if (matrix) { |
| 1170 m.Concat(*matrix); | 1170 m.Concat(*matrix); |
| 1171 } | 1171 } |
| 1172 switch (m_info.strokeColor->m_type) { | 1172 switch (m_info.strokeColor->m_type) { |
| 1173 case FX_COLOR_Solid: { | 1173 case FX_COLOR_Solid: { |
| 1174 FX_BOOL result = m_renderDevice->DrawPath( | 1174 FX_BOOL result = |
| 1175 path->GetPathData(), (CFX_Matrix*)&m, &m_info.graphState, 0x0, | 1175 m_renderDevice->DrawPath(path->GetPathData(), &m, &m_info.graphState, |
| 1176 m_info.strokeColor->m_info.argb, 0); | 1176 0x0, m_info.strokeColor->m_info.argb, 0); |
| 1177 if (!result) | 1177 if (!result) |
| 1178 return FWL_Error::Indefinite; | 1178 return FWL_Error::Indefinite; |
| 1179 return FWL_Error::Succeeded; | 1179 return FWL_Error::Succeeded; |
| 1180 } | 1180 } |
| 1181 case FX_COLOR_Pattern: | 1181 case FX_COLOR_Pattern: |
| 1182 return StrokePathWithPattern(path, &m); | 1182 return StrokePathWithPattern(path, &m); |
| 1183 case FX_COLOR_Shading: | 1183 case FX_COLOR_Shading: |
| 1184 return StrokePathWithShading(path, &m); | 1184 return StrokePathWithShading(path, &m); |
| 1185 default: | 1185 default: |
| 1186 return FWL_Error::PropertyInvalid; | 1186 return FWL_Error::PropertyInvalid; |
| 1187 } | 1187 } |
| 1188 } | 1188 } |
| 1189 | 1189 |
| 1190 FWL_Error CFX_Graphics::RenderDeviceFillPath(CFX_Path* path, | 1190 FWL_Error CFX_Graphics::RenderDeviceFillPath(CFX_Path* path, |
| 1191 FX_FillMode fillMode, | 1191 FX_FillMode fillMode, |
| 1192 CFX_Matrix* matrix) { | 1192 CFX_Matrix* matrix) { |
| 1193 if (!m_info.fillColor) | 1193 if (!m_info.fillColor) |
| 1194 return FWL_Error::PropertyInvalid; | 1194 return FWL_Error::PropertyInvalid; |
| 1195 CFX_Matrix m; | 1195 CFX_Matrix m; |
| 1196 m.Set(m_info.CTM.a, m_info.CTM.b, m_info.CTM.c, m_info.CTM.d, m_info.CTM.e, | 1196 m.Set(m_info.CTM.a, m_info.CTM.b, m_info.CTM.c, m_info.CTM.d, m_info.CTM.e, |
| 1197 m_info.CTM.f); | 1197 m_info.CTM.f); |
| 1198 if (matrix) { | 1198 if (matrix) { |
| 1199 m.Concat(*matrix); | 1199 m.Concat(*matrix); |
| 1200 } | 1200 } |
| 1201 switch (m_info.fillColor->m_type) { | 1201 switch (m_info.fillColor->m_type) { |
| 1202 case FX_COLOR_Solid: { | 1202 case FX_COLOR_Solid: { |
| 1203 FX_BOOL result = m_renderDevice->DrawPath( | 1203 FX_BOOL result = m_renderDevice->DrawPath( |
| 1204 path->GetPathData(), (CFX_Matrix*)&m, &m_info.graphState, | 1204 path->GetPathData(), &m, &m_info.graphState, |
| 1205 m_info.fillColor->m_info.argb, 0x0, fillMode); | 1205 m_info.fillColor->m_info.argb, 0x0, fillMode); |
| 1206 if (!result) | 1206 if (!result) |
| 1207 return FWL_Error::Indefinite; | 1207 return FWL_Error::Indefinite; |
| 1208 return FWL_Error::Succeeded; | 1208 return FWL_Error::Succeeded; |
| 1209 } | 1209 } |
| 1210 case FX_COLOR_Pattern: | 1210 case FX_COLOR_Pattern: |
| 1211 return FillPathWithPattern(path, fillMode, &m); | 1211 return FillPathWithPattern(path, fillMode, &m); |
| 1212 case FX_COLOR_Shading: | 1212 case FX_COLOR_Shading: |
| 1213 return FillPathWithShading(path, fillMode, &m); | 1213 return FillPathWithShading(path, fillMode, &m); |
| 1214 default: | 1214 default: |
| 1215 return FWL_Error::PropertyInvalid; | 1215 return FWL_Error::PropertyInvalid; |
| 1216 } | 1216 } |
| 1217 } | 1217 } |
| 1218 | 1218 |
| 1219 FWL_Error CFX_Graphics::RenderDeviceDrawImage(CFX_DIBSource* source, | 1219 FWL_Error CFX_Graphics::RenderDeviceDrawImage(CFX_DIBSource* source, |
| 1220 const CFX_PointF& point, | 1220 const CFX_PointF& point, |
| 1221 CFX_Matrix* matrix) { | 1221 CFX_Matrix* matrix) { |
| 1222 CFX_Matrix m1; | 1222 CFX_Matrix m1; |
| 1223 m1.Set(m_info.CTM.a, m_info.CTM.b, m_info.CTM.c, m_info.CTM.d, m_info.CTM.e, | 1223 m1.Set(m_info.CTM.a, m_info.CTM.b, m_info.CTM.c, m_info.CTM.d, m_info.CTM.e, |
| 1224 m_info.CTM.f); | 1224 m_info.CTM.f); |
| 1225 if (matrix) { | 1225 if (matrix) { |
| 1226 m1.Concat(*matrix); | 1226 m1.Concat(*matrix); |
| 1227 } | 1227 } |
| 1228 CFX_Matrix m2; | 1228 CFX_Matrix m2; |
| 1229 m2.Set((FX_FLOAT)source->GetWidth(), 0.0, 0.0, (FX_FLOAT)source->GetHeight(), | 1229 m2.Set((FX_FLOAT)source->GetWidth(), 0.0, 0.0, (FX_FLOAT)source->GetHeight(), |
| 1230 point.x, point.y); | 1230 point.x, point.y); |
| 1231 m2.Concat(m1); | 1231 m2.Concat(m1); |
| 1232 int32_t left, top; | 1232 int32_t left, top; |
| 1233 std::unique_ptr<CFX_DIBitmap> bmp1(source->FlipImage(FALSE, TRUE)); | 1233 std::unique_ptr<CFX_DIBitmap> bmp1(source->FlipImage(FALSE, TRUE)); |
| 1234 std::unique_ptr<CFX_DIBitmap> bmp2( | 1234 std::unique_ptr<CFX_DIBitmap> bmp2(bmp1->TransformTo(&m2, left, top)); |
| 1235 bmp1->TransformTo((CFX_Matrix*)&m2, left, top)); | |
| 1236 CFX_RectF r; | 1235 CFX_RectF r; |
| 1237 GetClipRect(r); | 1236 GetClipRect(r); |
| 1238 CFX_DIBitmap* bitmap = m_renderDevice->GetBitmap(); | 1237 CFX_DIBitmap* bitmap = m_renderDevice->GetBitmap(); |
| 1239 CFX_DIBitmap bmp; | 1238 CFX_DIBitmap bmp; |
| 1240 if (bmp.Create(bitmap->GetWidth(), bitmap->GetHeight(), FXDIB_Argb) && | 1239 if (bmp.Create(bitmap->GetWidth(), bitmap->GetHeight(), FXDIB_Argb) && |
| 1241 m_renderDevice->GetDIBits(&bmp, 0, 0) && | 1240 m_renderDevice->GetDIBits(&bmp, 0, 0) && |
| 1242 bmp.TransferBitmap(FXSYS_round(r.left), FXSYS_round(r.top), | 1241 bmp.TransferBitmap(FXSYS_round(r.left), FXSYS_round(r.top), |
| 1243 FXSYS_round(r.Width()), FXSYS_round(r.Height()), | 1242 FXSYS_round(r.Width()), FXSYS_round(r.Height()), |
| 1244 bmp2.get(), FXSYS_round(r.left - left), | 1243 bmp2.get(), FXSYS_round(r.left - left), |
| 1245 FXSYS_round(r.top - top)) && | 1244 FXSYS_round(r.top - top)) && |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1258 if (matrix) { | 1257 if (matrix) { |
| 1259 m1.Concat(*matrix); | 1258 m1.Concat(*matrix); |
| 1260 } | 1259 } |
| 1261 std::unique_ptr<CFX_DIBitmap> bmp1( | 1260 std::unique_ptr<CFX_DIBitmap> bmp1( |
| 1262 source->StretchTo((int32_t)rect.Width(), (int32_t)rect.Height())); | 1261 source->StretchTo((int32_t)rect.Width(), (int32_t)rect.Height())); |
| 1263 CFX_Matrix m2; | 1262 CFX_Matrix m2; |
| 1264 m2.Set(rect.Width(), 0.0, 0.0, rect.Height(), rect.left, rect.top); | 1263 m2.Set(rect.Width(), 0.0, 0.0, rect.Height(), rect.left, rect.top); |
| 1265 m2.Concat(m1); | 1264 m2.Concat(m1); |
| 1266 int32_t left, top; | 1265 int32_t left, top; |
| 1267 std::unique_ptr<CFX_DIBitmap> bmp2(bmp1->FlipImage(FALSE, TRUE)); | 1266 std::unique_ptr<CFX_DIBitmap> bmp2(bmp1->FlipImage(FALSE, TRUE)); |
| 1268 std::unique_ptr<CFX_DIBitmap> bmp3( | 1267 std::unique_ptr<CFX_DIBitmap> bmp3(bmp2->TransformTo(&m2, left, top)); |
| 1269 bmp2->TransformTo((CFX_Matrix*)&m2, left, top)); | |
| 1270 CFX_RectF r; | 1268 CFX_RectF r; |
| 1271 GetClipRect(r); | 1269 GetClipRect(r); |
| 1272 CFX_DIBitmap* bitmap = m_renderDevice->GetBitmap(); | 1270 CFX_DIBitmap* bitmap = m_renderDevice->GetBitmap(); |
| 1273 if (bitmap->CompositeBitmap(FXSYS_round(r.left), FXSYS_round(r.top), | 1271 if (bitmap->CompositeBitmap(FXSYS_round(r.left), FXSYS_round(r.top), |
| 1274 FXSYS_round(r.Width()), FXSYS_round(r.Height()), | 1272 FXSYS_round(r.Width()), FXSYS_round(r.Height()), |
| 1275 bmp3.get(), FXSYS_round(r.left - left), | 1273 bmp3.get(), FXSYS_round(r.left - left), |
| 1276 FXSYS_round(r.top - top))) { | 1274 FXSYS_round(r.top - top))) { |
| 1277 return FWL_Error::Succeeded; | 1275 return FWL_Error::Succeeded; |
| 1278 } | 1276 } |
| 1279 return FWL_Error::Indefinite; | 1277 return FWL_Error::Indefinite; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1290 CalcTextInfo(text, charCodes, charPos, rect); | 1288 CalcTextInfo(text, charCodes, charPos, rect); |
| 1291 CFX_Matrix m; | 1289 CFX_Matrix m; |
| 1292 m.Set(m_info.CTM.a, m_info.CTM.b, m_info.CTM.c, m_info.CTM.d, m_info.CTM.e, | 1290 m.Set(m_info.CTM.a, m_info.CTM.b, m_info.CTM.c, m_info.CTM.d, m_info.CTM.e, |
| 1293 m_info.CTM.f); | 1291 m_info.CTM.f); |
| 1294 m.Translate(0, m_info.fontSize * m_info.fontHScale); | 1292 m.Translate(0, m_info.fontSize * m_info.fontHScale); |
| 1295 if (matrix) { | 1293 if (matrix) { |
| 1296 m.Concat(*matrix); | 1294 m.Concat(*matrix); |
| 1297 } | 1295 } |
| 1298 FX_BOOL result = m_renderDevice->DrawNormalText( | 1296 FX_BOOL result = m_renderDevice->DrawNormalText( |
| 1299 length, charPos, m_info.font, CFX_GEModule::Get()->GetFontCache(), | 1297 length, charPos, m_info.font, CFX_GEModule::Get()->GetFontCache(), |
| 1300 -m_info.fontSize * m_info.fontHScale, (CFX_Matrix*)&m, | 1298 -m_info.fontSize * m_info.fontHScale, &m, m_info.fillColor->m_info.argb, |
| 1301 m_info.fillColor->m_info.argb, FXTEXT_CLEARTYPE); | 1299 FXTEXT_CLEARTYPE); |
| 1302 if (!result) | 1300 if (!result) |
| 1303 return FWL_Error::Indefinite; | 1301 return FWL_Error::Indefinite; |
| 1304 FX_Free(charPos); | 1302 FX_Free(charPos); |
| 1305 FX_Free(charCodes); | 1303 FX_Free(charCodes); |
| 1306 return FWL_Error::Succeeded; | 1304 return FWL_Error::Succeeded; |
| 1307 } | 1305 } |
| 1308 | 1306 |
| 1309 FWL_Error CFX_Graphics::StrokePathWithPattern(CFX_Path* path, | 1307 FWL_Error CFX_Graphics::StrokePathWithPattern(CFX_Path* path, |
| 1310 CFX_Matrix* matrix) { | 1308 CFX_Matrix* matrix) { |
| 1311 return FWL_Error::MethodNotSupported; | 1309 return FWL_Error::MethodNotSupported; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1331 if (hatchStyle < FX_HATCHSTYLE_Horizontal || | 1329 if (hatchStyle < FX_HATCHSTYLE_Horizontal || |
| 1332 hatchStyle > FX_HATCHSTYLE_SolidDiamond) { | 1330 hatchStyle > FX_HATCHSTYLE_SolidDiamond) { |
| 1333 return FWL_Error::IntermediateValueInvalid; | 1331 return FWL_Error::IntermediateValueInvalid; |
| 1334 } | 1332 } |
| 1335 const FX_HATCHDATA& data = hatchBitmapData[hatchStyle]; | 1333 const FX_HATCHDATA& data = hatchBitmapData[hatchStyle]; |
| 1336 CFX_DIBitmap mask; | 1334 CFX_DIBitmap mask; |
| 1337 mask.Create(data.width, data.height, FXDIB_1bppMask); | 1335 mask.Create(data.width, data.height, FXDIB_1bppMask); |
| 1338 FXSYS_memcpy(mask.GetBuffer(), data.maskBits, mask.GetPitch() * data.height); | 1336 FXSYS_memcpy(mask.GetBuffer(), data.maskBits, mask.GetPitch() * data.height); |
| 1339 CFX_FloatRect rectf = path->GetPathData()->GetBoundingBox(); | 1337 CFX_FloatRect rectf = path->GetPathData()->GetBoundingBox(); |
| 1340 if (matrix) { | 1338 if (matrix) { |
| 1341 rectf.Transform((const CFX_Matrix*)matrix); | 1339 rectf.Transform(matrix); |
| 1342 } | 1340 } |
| 1343 FX_RECT rect(FXSYS_round(rectf.left), FXSYS_round(rectf.top), | 1341 FX_RECT rect(FXSYS_round(rectf.left), FXSYS_round(rectf.top), |
| 1344 FXSYS_round(rectf.right), FXSYS_round(rectf.bottom)); | 1342 FXSYS_round(rectf.right), FXSYS_round(rectf.bottom)); |
| 1345 CFX_FxgeDevice device; | 1343 CFX_FxgeDevice device; |
| 1346 device.Attach(&bmp, false, nullptr, false); | 1344 device.Attach(&bmp, false, nullptr, false); |
| 1347 device.FillRect(&rect, m_info.fillColor->m_info.pattern->m_backArgb); | 1345 device.FillRect(&rect, m_info.fillColor->m_info.pattern->m_backArgb); |
| 1348 for (int32_t j = rect.bottom; j < rect.top; j += mask.GetHeight()) { | 1346 for (int32_t j = rect.bottom; j < rect.top; j += mask.GetHeight()) { |
| 1349 for (int32_t i = rect.left; i < rect.right; i += mask.GetWidth()) { | 1347 for (int32_t i = rect.left; i < rect.right; i += mask.GetWidth()) { |
| 1350 device.SetBitMask(&mask, i, j, | 1348 device.SetBitMask(&mask, i, j, |
| 1351 m_info.fillColor->m_info.pattern->m_foreArgb); | 1349 m_info.fillColor->m_info.pattern->m_foreArgb); |
| 1352 } | 1350 } |
| 1353 } | 1351 } |
| 1354 | 1352 |
| 1355 m_renderDevice->SaveState(); | 1353 m_renderDevice->SaveState(); |
| 1356 m_renderDevice->SetClip_PathFill(path->GetPathData(), (CFX_Matrix*)matrix, | 1354 m_renderDevice->SetClip_PathFill(path->GetPathData(), matrix, fillMode); |
| 1357 fillMode); | |
| 1358 SetDIBitsWithMatrix(&bmp, &pattern->m_matrix); | 1355 SetDIBitsWithMatrix(&bmp, &pattern->m_matrix); |
| 1359 m_renderDevice->RestoreState(false); | 1356 m_renderDevice->RestoreState(false); |
| 1360 return FWL_Error::Succeeded; | 1357 return FWL_Error::Succeeded; |
| 1361 } | 1358 } |
| 1362 | 1359 |
| 1363 FWL_Error CFX_Graphics::FillPathWithShading(CFX_Path* path, | 1360 FWL_Error CFX_Graphics::FillPathWithShading(CFX_Path* path, |
| 1364 FX_FillMode fillMode, | 1361 FX_FillMode fillMode, |
| 1365 CFX_Matrix* matrix) { | 1362 CFX_Matrix* matrix) { |
| 1366 CFX_DIBitmap* bitmap = m_renderDevice->GetBitmap(); | 1363 CFX_DIBitmap* bitmap = m_renderDevice->GetBitmap(); |
| 1367 int32_t width = bitmap->GetWidth(); | 1364 int32_t width = bitmap->GetWidth(); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1467 result = true; | 1464 result = true; |
| 1468 break; | 1465 break; |
| 1469 } | 1466 } |
| 1470 default: { | 1467 default: { |
| 1471 result = false; | 1468 result = false; |
| 1472 break; | 1469 break; |
| 1473 } | 1470 } |
| 1474 } | 1471 } |
| 1475 if (result) { | 1472 if (result) { |
| 1476 m_renderDevice->SaveState(); | 1473 m_renderDevice->SaveState(); |
| 1477 m_renderDevice->SetClip_PathFill(path->GetPathData(), (CFX_Matrix*)matrix, | 1474 m_renderDevice->SetClip_PathFill(path->GetPathData(), matrix, fillMode); |
| 1478 fillMode); | |
| 1479 SetDIBitsWithMatrix(&bmp, matrix); | 1475 SetDIBitsWithMatrix(&bmp, matrix); |
| 1480 m_renderDevice->RestoreState(false); | 1476 m_renderDevice->RestoreState(false); |
| 1481 } | 1477 } |
| 1482 return result ? FWL_Error::Succeeded : FWL_Error::PropertyInvalid; | 1478 return result ? FWL_Error::Succeeded : FWL_Error::PropertyInvalid; |
| 1483 } | 1479 } |
| 1484 | 1480 |
| 1485 FWL_Error CFX_Graphics::SetDIBitsWithMatrix(CFX_DIBSource* source, | 1481 FWL_Error CFX_Graphics::SetDIBitsWithMatrix(CFX_DIBSource* source, |
| 1486 CFX_Matrix* matrix) { | 1482 CFX_Matrix* matrix) { |
| 1487 if (matrix->IsIdentity()) { | 1483 if (matrix->IsIdentity()) { |
| 1488 m_renderDevice->SetDIBits(source, 0, 0); | 1484 m_renderDevice->SetDIBits(source, 0, 0); |
| 1489 } else { | 1485 } else { |
| 1490 CFX_Matrix m; | 1486 CFX_Matrix m; |
| 1491 m.Set((FX_FLOAT)source->GetWidth(), 0, 0, (FX_FLOAT)source->GetHeight(), 0, | 1487 m.Set((FX_FLOAT)source->GetWidth(), 0, 0, (FX_FLOAT)source->GetHeight(), 0, |
| 1492 0); | 1488 0); |
| 1493 m.Concat(*matrix); | 1489 m.Concat(*matrix); |
| 1494 int32_t left, top; | 1490 int32_t left, top; |
| 1495 std::unique_ptr<CFX_DIBitmap> bmp1(source->FlipImage(FALSE, TRUE)); | 1491 std::unique_ptr<CFX_DIBitmap> bmp1(source->FlipImage(FALSE, TRUE)); |
| 1496 std::unique_ptr<CFX_DIBitmap> bmp2( | 1492 std::unique_ptr<CFX_DIBitmap> bmp2(bmp1->TransformTo(&m, left, top)); |
| 1497 bmp1->TransformTo((CFX_Matrix*)&m, left, top)); | |
| 1498 m_renderDevice->SetDIBits(bmp2.get(), left, top); | 1493 m_renderDevice->SetDIBits(bmp2.get(), left, top); |
| 1499 } | 1494 } |
| 1500 return FWL_Error::Succeeded; | 1495 return FWL_Error::Succeeded; |
| 1501 } | 1496 } |
| 1502 | 1497 |
| 1503 FWL_Error CFX_Graphics::CalcTextInfo(const CFX_WideString& text, | 1498 FWL_Error CFX_Graphics::CalcTextInfo(const CFX_WideString& text, |
| 1504 uint32_t* charCodes, | 1499 uint32_t* charCodes, |
| 1505 FXTEXT_CHARPOS* charPos, | 1500 FXTEXT_CHARPOS* charPos, |
| 1506 CFX_RectF& rect) { | 1501 CFX_RectF& rect) { |
| 1507 std::unique_ptr<CFX_UnicodeEncoding> encoding( | 1502 std::unique_ptr<CFX_UnicodeEncoding> encoding( |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1565 CTM = other.CTM; | 1560 CTM = other.CTM; |
| 1566 isActOnDash = other.isActOnDash; | 1561 isActOnDash = other.isActOnDash; |
| 1567 strokeColor = other.strokeColor; | 1562 strokeColor = other.strokeColor; |
| 1568 fillColor = other.fillColor; | 1563 fillColor = other.fillColor; |
| 1569 font = other.font; | 1564 font = other.font; |
| 1570 fontSize = other.fontSize; | 1565 fontSize = other.fontSize; |
| 1571 fontHScale = other.fontHScale; | 1566 fontHScale = other.fontHScale; |
| 1572 fontSpacing = other.fontSpacing; | 1567 fontSpacing = other.fontSpacing; |
| 1573 return *this; | 1568 return *this; |
| 1574 } | 1569 } |
| OLD | NEW |