在 Ruby 中显示和隐藏 Visio Diagram 的网格、标尺、参考线和分页符

Aspose.Diagram - 显示和隐藏 Visio 的网格、标尺、参考线和分页符 Diagram

要显示和隐藏 Visio Diagram 的网格、标尺、参考线和分页符,请使用Aspose.Diagram Java 红宝石 只需调用显示隐藏属性模块。在这里您可以看到示例代码。

红宝石代码

 data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'

\# Create instance of Diagram

diagram = Rjb::import('com.aspose.diagram.Diagram').new(data_dir + "Drawing.vsd")

\# get window object by index

window = diagram.getWindows().get(0)

\# set visibility of grid

window.setShowGrid(1)

\# set visibility of guides

window.setShowGuides(1)

\# set visibility of rulers

window.setShowRulers(1)

\# set visibility of page breaks

window.setShowPageBreaks(1)

\# save in any supported format

diagram.save(data_dir + "ShowHideProperties.vdx", Rjb::import('com.aspose.diagram.SaveFileFormat').VDX)

puts "Show and Hide Grids, Rulers, Guides and Page Breaks of the Visio Diagram."

下载运行代码

下载显示和隐藏 Visio Diagram (Aspose.Diagram) 的网格、标尺、参考线和分页符来自以下任何社交编码网站: