Comments (5)
Hi Thom
see http://www.drawbot.com/content/canvas/pages.html#size http://www.drawbot.com/content/canvas/pages.html#size
It is advised to use size() always at the top of the script
gr Frederik
www.typemytype.com
On 25 Apr 2015, at 21:35, Thom Janssen [email protected] wrote:
I tried to crop my canvas but it seems this is not the way?
example:
rect(100,200,300,400)
translate(100,200)
size(300,400)
The result is cropped from the original origin. Not the one set in line 2.I know there is an advice to use size() on the top of the script, but I what if you don't know where something will be drawn?
I have some scripts where (randomly) things are drawn. The script keeps track of the minimum-x, minimum-y, max-x and max-y. Later I want to crop the canvas and/or expand it, to fit it all nicely...Any ideas?
Thanks, Thom
β
Reply to this email directly or view it on GitHub #15.
from drawbot.
Hi Frederik,
Thanks. I know about the advice.
There is -for now- no way to crop the canvas, after some drawing is done?
Thom
from drawbot.
Calculate your positions first, then do the appropriate size() and translate(), then do your drawing.
from drawbot.
Closing this issue: there's no way size() can honor the current transformation. Imagine a skew or rotation...
from drawbot.
Thanks Just.
Your suggestion is already my current set up :)
from drawbot.
Related Issues (20)
- pick a named instance of a variation font without installed it first HOT 8
- ImageObject renders scaled when its image input dpi metadata is not 72 HOT 1
- File size of pdf with image HOT 2
- Upgrade notarization to use notarytool instead of altool HOT 1
- Improve `language()` support / implementation HOT 8
- Serving `NSFont` to `font` HOT 9
- `imageSize()` with svg images HOT 6
- Combining `textBoxCharacterBounds()` with `FormattedString.fontFilePath()` does not seem to work
- Add argument for listFontGlyphNames() ? HOT 4
- fontContainsCharacters() returns False for characters > U+FFFF even though the font actually maps them HOT 3
- FormattedString.appendGlyph("Space") creates unexpected justification ? HOT 3
- TextBox() text clipping when used as a module HOT 3
- Apparently DrawBot does not respect PDF clip box HOT 1
- Multiple fonts for `fallbackFont` HOT 1
- Function to get current fontSize() HOT 2
- CMYK Colors and Color profile do not export correctly with saveImage()
- Cannot use fontβs .notdef glyph in FormattedString
- set alpha value
- Internal Links on PDFs generated with DrawBot behave differently on Preview+Safari compared to Acrobat Reader HOT 6
- Formattedstring Strikethrough Attribute HOT 4
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 drawbot.