OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkCanvas.h" | 8 #include "SkCanvas.h" |
9 #include "SkDevice.h" | 9 #include "SkDevice.h" |
10 #include "SkForceLinking.h" | 10 #include "SkForceLinking.h" |
(...skipping 1918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1929 } | 1929 } |
1930 | 1930 |
1931 if (gs->has_CA()) { | 1931 if (gs->has_CA()) { |
1932 skpdfGraphicsStateApply_CA(pdfContext, gs->CA(pdfContext->fPdfDoc)); | 1932 skpdfGraphicsStateApply_CA(pdfContext, gs->CA(pdfContext->fPdfDoc)); |
1933 } | 1933 } |
1934 | 1934 |
1935 if (gs->has_AIS()) { | 1935 if (gs->has_AIS()) { |
1936 skpdfGraphicsStateApplyAIS(pdfContext, gs->AIS(pdfContext->fPdfDoc)); | 1936 skpdfGraphicsStateApplyAIS(pdfContext, gs->AIS(pdfContext->fPdfDoc)); |
1937 } | 1937 } |
1938 | 1938 |
1939 return kNYI_PdfResult; | 1939 return kOK_PdfResult; |
1940 } | 1940 } |
1941 | 1941 |
1942 //charSpace Tc Set the character spacing, Tc | 1942 //charSpace Tc Set the character spacing, Tc |
1943 //, to charSpace, which is a number expressed in unscaled text space units. Char
acter spacing is used by the Tj, TJ, and ' operators. | 1943 //, to charSpace, which is a number expressed in unscaled text space units. Char
acter spacing is used by the Tj, TJ, and ' operators. |
1944 //Initial value: 0. | 1944 //Initial value: 0. |
1945 PdfResult PdfOp_Tc(PdfContext* pdfContext, SkCanvas* canvas, PdfTokenLooper** lo
oper) { | 1945 PdfResult PdfOp_Tc(PdfContext* pdfContext, SkCanvas* canvas, PdfTokenLooper** lo
oper) { |
1946 double charSpace = pdfContext->fObjectStack.top()->numberValue(); pdfCon
text->fObjectStack.pop(); | 1946 double charSpace = pdfContext->fObjectStack.top()->numberValue(); pdfCon
text->fObjectStack.pop(); |
1947 pdfContext->fGraphicsState.fCharSpace = charSpace; | 1947 pdfContext->fGraphicsState.fCharSpace = charSpace; |
1948 | 1948 |
1949 return kOK_PdfResult; | 1949 return kOK_PdfResult; |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2443 | 2443 |
2444 rect = SkRect::MakeWH(width, height); | 2444 rect = SkRect::MakeWH(width, height); |
2445 | 2445 |
2446 setup_bitmap(output, (int)SkScalarToDouble(width), (int)SkScalarToDouble(hei
ght)); | 2446 setup_bitmap(output, (int)SkScalarToDouble(width), (int)SkScalarToDouble(hei
ght)); |
2447 | 2447 |
2448 SkAutoTUnref<SkDevice> device(SkNEW_ARGS(SkDevice, (*output))); | 2448 SkAutoTUnref<SkDevice> device(SkNEW_ARGS(SkDevice, (*output))); |
2449 SkCanvas canvas(device); | 2449 SkCanvas canvas(device); |
2450 | 2450 |
2451 return renderer.renderPage(page, &canvas, rect); | 2451 return renderer.renderPage(page, &canvas, rect); |
2452 } | 2452 } |
OLD | NEW |