I'm using V3d_View::ToPixMap() to create high resolution bitmaps for printing the contents of my OpenCascade window. In general, this is working. However, I have an issue with line weights.
The problem is that my screen is showing an area of maybe 500 x 500 pixels, in which a lineweight of 2 looks fine. My printer, on the other hand, is drawing an image of ~4000 x 4000 pixels, at 600 dpi. When I create my 4000 x 4000 pixmap, the lineweight of 2 looks much too fine.
Is there any way that I can scale the lineweight in my view, or do I need to go throught each element in my scene and adjust the lineweight on each? I'll also have to fix the trihedron, and probably textures and maybe text.
Any suggestions on the 'right' way to fix this would be appreciated.
Thanks
Discussion
4 archived replies
Posts are displayed in their archived order.
01Commenter-1
What are you using to set the lineweight with?
Last night I was toying around with:
[code]
Handle_Prs3d_Drawer drawer = myContext->DefaultDrawer();
Handle_Prs3d_LineAspect newWireAspect = new Prs3d_LineAspect(newColor, Aspect_TOL_DOTDASH, 1.0); //0.0 segfaults, 1.0 min, 10.0 max
drawer->SetWireAspect(newWireAspect);
[/code]
to set any new lines drawn to that color/linetype/lineweight.
and it appears that any lineweight greater than 10.0 doesn't make a difference on screen.
I'm not sure if there is a way to do it if you are just taking screenshots, but offseting your elements with a heavier lineweight should theoretically solve the problem. After the screenshot is made, you could erase the temporary offset lines.
This is working perfectly for me, the lines appear nice and solid for the print-out, but are never redrawn on the screen itself so the user has no idea I've been messing with it.
I may try it again by changing the default drawer's aspect. That was exactly the sort of elegant solution I was looking for when I posted my question.
Thanks!
04Commenter-3
Author! Many thanks for your IDEA! Good Luck with your working.