I have created a picture in Asymptote. Now I want to resize it, so that the resulting image is bigger. The problem is that if I call size() or unitsize(), the sizes of TeX labels and line widths (which are hard-coded) are left untouched. I'd like to resize these along with the image, so that the lines look the same width (and the labels look the same size) in proportion to the size of the whole picture. Is it possible to do that from Asymptote?
Asymptote: resizing the picture (including pen widths and font sizes)
1.4k views Asked by ondra.cifka At
2
There are 2 answers
0
MattyV
On
Well... This is a very old question, but let's give it a more ready-to-use answer. First draw it to one picture, which will use deferred drawing/automatic scaling as normal. Then, draw that picture to another one, with additional scaling to taste.
real originalSize = 3inch;
real scaledSize = 12inch;
size(originalSize);
// ... draw your picture
picture original = currentpicture;
currentpicture = new picture;
add(scale(scaledSize / originalSize) * original.fit())
Related Questions in IMAGE
- Golang lambda upload image into s3 static website
- Put an image behind the title in a WP, WooCommerce "shop" page
- How to create an JSOUP element from byte array image (Load from Database)
- Cloudflare not respecting Cache-Control
- Sending multiple images and data in a single angular observable
- Create and combine several images into a single image for my react native App
- Should I compress images in java backend before sending to frontend?
- Javascript Place Image Where User Clicks
- Whitespace in document has a bottom border remnant or some other line at the bottom of the whitespace
- Sony Spresense Camera Board
- After completely installation and done all the work i am getting Permission denied error do any one have solution
- HTML page on NAS server image not showing on mobile phone
- mouse coordinates in image go below 0 and above width
- Why are the css images or js not loading in my laravel project?
- Python pillow library text align center
Related Questions in FONTS
- How to change the Font Weight of a SelectValue component in React when a SelectItem is selected?
- In my Flutter Project, I want to customize the font of a text, but it doesn't work
- Ubuntu wsl2 in windows, my /etc/fonts/fonts.conf keeps reloading
- Problem with sample code to set font properties for a whole XWPF Paragraph that includes Word fields
- I need to display alt characters
- Change back to default font size in Android Studio
- Custom Fonts used in react.js application are not visible after deployment on vercel
- Changing font colour on locked text box
- how to implement ZWJ and NZWJ in fontlab
- The p5js library's loadFont function does not seem to work for me?
- Use Google Font Without Network Connection
- How Can I Use the Poppins Font on My Website (coded with HTML, CSS, and JavaScript)?
- PDField set default appearances multiple fonts - pdfbox 2.0
- Why is my font-weight only switching from normal and bold instead of following the number?
- How to extract font names using PyMuPDF without subsets?
Related Questions in RESIZE
- Change back to default font size in Android Studio
- Change the maximum screen size icon (and variable) by dragging the TitleBar
- Java resized JPEG seems to be invalid format for Facebook?
- I can't handle resize and transform with jquery
- Excel VBA Macro Resizing the Plot Area
- How to disable dragging while resizing a card using the @dnd-kit/core library in React?
- How to resize maximized child window programmatically
- CSS - making an element short on its own
- JavaFX dynamically resizes window based on the amount of VBox elements
- How can I get the width and height of a GUI window in AHK?
- Image won't resize when live but ok in Visual studio code
- QOpenGLWidget with Qpainter: OpenGL drawing only visible after first paintGL call
- ResizeObserver callback is not being fired when rotated device two times
- Addition of one 4-bit and one 3-bit inputs in VHDL
- How to resize circle div dynamically?
Related Questions in IMAGE-SIZE
- In shopify set default product image size
- Css text styling with image
- ggsave is ignoring my specification for height and width
- Error using commonjs library in a aws lambda function bundled with mjs for node.js 20
- Preparing a power point presentation with R markdown
- How to move image in flutter Card by small amount
- Need to export a div into multiple HD images of same height for print, but getting blurry images
- How to capture id size photo with webcam using python
- React native Image with no fixed size not showing in FlatList
- How can I make custom resizing for images?
- creating an image using custom font for given font_size in java similar to python
- Fit image into available height remaining
- How to get the listing of all the images used in post and pages of a WordPress website to delete the unused images?
- Enlarged images did not displayed in browser, vite, react
- Bootstrap each card instance images are different height
Related Questions in METAPOST
- How to use postscripts from metapost as images in graphviz?
- Algorithm to traverse edges of a hex grid between two points
- makefile for metapost: how to compile file-N.pdf
- How to convert numeric parameter to text in a MetaPost macro
- Strange Metapost parenthesis bug
- MetaPost output an empty picture when using label
- Strings in mpost for loop
- METAPOST: using loop variables in labels
- Metapost Equations
- Asymptote: resizing the picture (including pen widths and font sizes)
- Is it possible to include one MetaPost file into another?
- Should I buy a book on both LaTeX and MetaPost, or just MetaPost?
- How to generate a polygon number figure using metapost?
- How to view output .mp files from Functional MetaPost
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
I am not a highly experienced MetaPost/Asymptote user and I am also only now learning the two. But I was reading the Asymptote FAQ and I hope http://asymptote.sourceforge.net/FAQ/section8.html#manualscaling will answer your question.