Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fitting page size and position #3

Open
sadowsky-o-phd opened this issue Sep 25, 2016 · 2 comments
Open

Fitting page size and position #3

sadowsky-o-phd opened this issue Sep 25, 2016 · 2 comments

Comments

@sadowsky-o-phd
Copy link

Hi Brad,

It's good to know that you continue to maintain CalTag. I really like it.

I have a feature request in the generate_pattern script. I want to embed the CalTag pattern in a larger calibration rig. For this, I need the pattern to be aligned with the page boundary and include a proper page size.

I did this manually a few times, but it's be nice to have in automated.

What's needed is a << PageSize statement around the head of the file, such as:

<< /PageSize [1700.79 1700.79] >> setpagedevice

And also an additional shift of the pattern origin (around line 51 of the ps file) to be translation of -4 -4 instead of -2 -2.

Another user might still want the pattern end to be completely within the page, not on the boundary, so it's a judgment call whether to do this. But for me, again, it'd be nice.

Thanks.

Ofri Sadowsky

@brada
Copy link
Owner

brada commented Sep 27, 2016

Thanks for the feedback. I don't mind making these changes, but would prefer to keep them on a separate branch. Do you mind submitting a pull request?

Unfortunately I don't have a Matlab license any more, so I don't actively maintain this project any more. It's been a while since I looked at PostScript - where does that 1700.79 number come from? Would it change depend on Letter/A4 page sizing?

@sadowsky-o-phd
Copy link
Author

The page size is user-defined in units of points, with 72 points per inch. You can compute it by taking the bounding box of the pattern in inches (if in centimeters then scale appropriately) and multiply by 72. Specifically, 1700.79 = (60 cm / 2.54) * 72.

I guess that there is a default, but to embed the pattern in another figure a realistic box should be defined.

The change would be in generate_pattern.py and does not involve Matlab.

The page size directive, like the one above (including all the << and >> signs) can come right before the config block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants