如何导出具有抗锯齿功能的 GraphicsRow?

发布于 2024-10-08 11:17:13 字数 1360 浏览 1 评论 0原文

当我将两个对象放入 GraphicsRow 内部时,似乎关闭了它们的抗锯齿功能。任何人都可以看到下面示例中使用抗锯齿导出图形行的某种方法吗?


(来源:yaroslavvb.com

我尝试过Style[#,Antialiasing->True] 和 Preferences 的各种组合,但没有运气。 我最接近的解决方法是以 4 倍分辨率对它们进行光栅化,但这会产生使用绝对厚度更改对象外观的副作用,例如,每个对象周围的框对象变得淡出。

picA = Graphics3D[{Opacity[0.5], 
    GraphicsComplex[{{-1., 0., 0.}, {0., -1., 0.}, {0., 0., -1.}, {0.,
        0., 1.}, {0., 1., 0.}, {1., 0., 
       0.}}, {{{EdgeForm[GrayLevel[0.]], 
        GraphicsGroup[{Polygon[{{4, 5, 1}, {1, 5, 3}, {1, 3, 2}, {4, 
             1, 2}, {3, 5, 6}, {5, 4, 6}, {4, 2, 6}, {2, 3, 
             6}}]}]}, {}, {}, {}, {}}}]}];
picB = Graphics3D[{Opacity[0.5], 
    GraphicsComplex[{{-1., 0., 0.}, {-0.5, -0.8660254037844386, 
       0.}, {-0.5, 0.8660254037844386, 1.}, {0., 
       0., -1.}, {0.5, -0.8660254037844386, 1.}, {0.5, 
       0.8660254037844386, 0.}, {1., 0., 
       0.}}, {{{EdgeForm[GrayLevel[0.]], 
        GraphicsGroup[{Polygon[{{6, 7, 4}, {2, 1, 4}}], 
          Polygon[{{1, 2, 5, 3}, {6, 3, 5, 7}, {5, 2, 4, 7}, {3, 6, 4,
              1}}]}]}, {}, {}, {}, {}}}]}];
GraphicsRow[{picA, picB}]

When I put two objects below inside GraphicsRow, it seems to turn off their antialiasing. Can anyone see some way to Export graphics row in example below with antialiasing?


(source: yaroslavvb.com)

I tried various combination of Style[#,Antialiasing->True] and Preferences with no luck.
The closest work-around I is to Rasterize them at 4 times the resolution, but that has a side effect of changing appearance of objects with AbsoluteThickness, for instance, Box around each object becomes faded out.

picA = Graphics3D[{Opacity[0.5], 
    GraphicsComplex[{{-1., 0., 0.}, {0., -1., 0.}, {0., 0., -1.}, {0.,
        0., 1.}, {0., 1., 0.}, {1., 0., 
       0.}}, {{{EdgeForm[GrayLevel[0.]], 
        GraphicsGroup[{Polygon[{{4, 5, 1}, {1, 5, 3}, {1, 3, 2}, {4, 
             1, 2}, {3, 5, 6}, {5, 4, 6}, {4, 2, 6}, {2, 3, 
             6}}]}]}, {}, {}, {}, {}}}]}];
picB = Graphics3D[{Opacity[0.5], 
    GraphicsComplex[{{-1., 0., 0.}, {-0.5, -0.8660254037844386, 
       0.}, {-0.5, 0.8660254037844386, 1.}, {0., 
       0., -1.}, {0.5, -0.8660254037844386, 1.}, {0.5, 
       0.8660254037844386, 0.}, {1., 0., 
       0.}}, {{{EdgeForm[GrayLevel[0.]], 
        GraphicsGroup[{Polygon[{{6, 7, 4}, {2, 1, 4}}], 
          Polygon[{{1, 2, 5, 3}, {6, 3, 5, 7}, {5, 2, 4, 7}, {3, 6, 4,
              1}}]}]}, {}, {}, {}, {}}}]}];
GraphicsRow[{picA, picB}]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风蛊 2024-10-15 11:17:13

只是一个简短的评论:您是否在“首选项”对话框中启用了抗锯齿功能?

just a quick comment: have you enabled anti-aliasing in the Preferences dialog?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文