Comments (2)
There isn't any explicit API for that, but you may use vpype.Document.page_size
and vpype.UNITS
to the same effect. Both are public API so it shouldn't break in the future.
import vpype
# a document with some page size
doc = vpype.Document()
doc.page_size = (100, 200)
# document width in inches
print(doc.page_size[0] / vpype.UNITS['in'])
# -> 1.0416666666666667
Edit: to be clear, I'd certainly consider a PR with a proper API for that ;)
from vpype.
Good enough for me, thanks.
from vpype.
Related Issues (20)
- Add support for Axidraw layer name syntax
- Add more filter options HOT 2
- reloop puts the seams where the points are rather than spreading them uniformly over the length of the closed path HOT 1
- `read` entirely discards file containing NaN
- Is there a way to use vpype to count the number of lines/paths in an svg file? HOT 1
- Pyside 6.5.0 breaking changes (Linux) HOT 1
- Change the layer ID interpretation to match EMSL standard HOT 1
- `--fit-to-margins` adds boarder around margin HOT 1
- Curved Line Spacing Problem HOT 4
- Allow for `layout` arg to maintain size of svg element
- Output error messages when using `execute` from vpype API HOT 4
- Cursive font glyphs are split in multiple strokes HOT 2
- Examples in `lreverse`'help are wrong
- Add support for various stroke font format
- Remove mentions of `--page-size` in `layout` help
- Extra layer when running two read/writes within one pipeline HOT 1
- Color overwritten using dipping pattern recipe
- Request: linemerge option to only merge when turn angle is small HOT 1
- Is there a way to tostring() a Document? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vpype.