Tim van der Meij
5194e68134
Lint: correct code style violations
...
Manual observations and working with other linting tools found these.
9 years ago
Yury Delendik
1236b27993
Removes SVG this.cgrp usages.
9 years ago
Tim van der Meij
426fc454de
SVG: factor out initialization code into a private method
...
Each well-formed SVG image has the following structure:
SVG element
- Definitions element
- Root group
- Other group 1
- ...
- Other group n
This patch factors out initialization code into a private method in such
as way that the creation of this structure is clear from the code. The
root group is the replacement for the parent group from before. We need
this group as we cannot apply the viewport transform on the SVG element
itself (this caused issues in Chrome). If other code appends groups to
the SVG image, in reality it is appending those groups to the root
group, but this detail is abstracted away by this patch.
9 years ago
Tim van der Meij
fa90573c4b
SVG: optimize transform group creation
...
This patch ensures that we only create transformation groups when it is
actually required and that we re-use transform groups as much as possible.
It reduces the number of transform groups for the Tracemonkey paper from
2790 to 1271, thereby making the DOM much lighter and rendering/scrolling
smoother. Moreover, it simplifies the code and prevents duplication.
Finally, we issue a warning when an unimplemented graphic state is
encountered. Before, this was ignored silently, making debugging harder.
9 years ago
Yury Delendik
0576c9c6c6
Replaces all preprocessor directives with PDFJSDev calls.
9 years ago
Yury Delendik
1d12aed5ca
Move all PDFJS.xxx settings into display/global.
9 years ago
Yury Delendik
bda5e6235e
Removes global PDFJS usage from the src/core/.
9 years ago
Yury Delendik
2edf2792dc
Replaces literal {} created lookup tables with Object.create
9 years ago
Yury Delendik
fc3282db56
Adds RequireJS to worker.
9 years ago
Yury Delendik
6b60c8f4db
Adds UMD headers to core, display and shared files.
9 years ago
Manas
a2ba1b8189
Uses editorconfig to maintain consistent coding styles
...
Removes the following as they unnecessary
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
10 years ago
Tim van der Meij
989eac2f1e
Enable OPS.setHScale in the SVG backend
10 years ago
Collin Anderson
54e984c763
cleaned whitespace
10 years ago
Fabian Lange
ceffeab1de
Use 3 param method for converting r,g,b into css string.
...
This avoids creation of temporary arrays to pass them into the util
method. Also using "arguments" is more expensive then passing in 3
parameters.
11 years ago
Tim van der Meij
32853c07f4
Implements paintFormXObject in svg.js
11 years ago
Tim van der Meij
1d02ace81f
Optimizes defaults for svg.js
11 years ago
Yury Delendik
de23d3791e
Fixes image and font embedding
11 years ago
Yury Delendik
0f862e7eb3
Adds svg.js to the generic and singlefile builds
11 years ago
Yury Delendik
bc574aa629
Refactors SVG api
11 years ago
pramodhkp
6d53fc4db7
Minor changes for api.js, font_loader.js and svg.js
11 years ago
Tim van der Meij
44fbf0ce14
Miscellaneous code improvements for svg.js
11 years ago
Yury Delendik
dae92b9cc7
Uses float number formatter to print numbers in SVG
11 years ago
Tim van der Meij
b6e4ac9070
Nit fixes for svg.js
11 years ago
Yury Delendik
56f0539045
Reduces amount of used memory during PNG creation.
11 years ago
pramodhkp
458b69b649
Adds image and mask features, fixes clippath
11 years ago
Jonas Jenwald
4a82dac45b
Add strict equalities in src/display/svg.js
11 years ago
pramodhkp
6e4dd83a4d
Added endPath, endText. fixes extra <g> elements
11 years ago
pramodhkp
2380b38b27
Fixed setGState, viewport transform
11 years ago
pramodhkp
a55c9856e9
Misc variable initialization
11 years ago
pramodhkp
0688fd3d70
Added fill, stroke, line-join & font attr
11 years ago
pramodhkp
03f1de3403
Added clip operator
11 years ago
pramodhkp
afd853e962
Added units for lengths
11 years ago
pramodhkp
86e584d767
Memory optimzation for constructPath
11 years ago
pramodhkp
7efd50e64d
Added paintJpegXObject
11 years ago
pramodhkp
d799a18b74
Added paintSolidColorImageMask
11 years ago
pramodhkp
c8a4ab3a19
Optimization of save/restore usage
11 years ago
pramodhkp
8407d28c9e
Combine re element into constructPath
11 years ago
Yury Delendik
834f466c05
Fixes SVG transforms on restore
11 years ago
pramodhkp
dd253aadeb
SVG Viewer example demo
11 years ago