【问题标题】:Coreldraw export filter object modelCoreldraw 导出过滤器对象模型
【发布时间】:2014-03-28 02:12:25
【问题描述】:

谁能帮助我了解 coreldraw 中的 exportfilter 对象模型?我找不到关于这个主题的任何好的信息,除了我不明白它是怎么回事的示例代码?我是 vba coreldraw 的新手。

Dim exF as ExportFilter
From object browser ExportFilter has
Finish - method
HasDialog - properties
Reset - method
ShowDialog - method

My questions how many sample code that scattered on many forum about coreldraw vba can include for example,

With exF
    m_Compression = .Compression
    m_Smoothing = .Smoothing
    m_bOptimized = .Optimized
    m_Progressive = .Progressive
    m_Subformat = .Subformat
End With
I am sorry but i copy those above code from JPGExportOptions just to get the picture what the question i ask to this forum
How can i find and know that JPGExportFilter has
.Compression
.Smoothing
.Optimized
etc

 All this is JPGExportFilter object model, i just want to know why this properties or method does not reveal on object browser vba window and does not have any help associated with all those ExportFilter object model

如果我只能复制别人制作的程序,我如何称自己为专业程序员。我只想知道 ExportFilter 类的详细信息。不幸的是,很少有书讨论 coreldraw vba。这个网站http://www.oberonplace.com/vba/filter10vba.htm 不错,但是,我需要的不仅仅是一个列表,还需要更多信息,我需要解释类的每个成员——属性和方法——以及如何在实际代码中使用它。

谢谢

【问题讨论】:

  • hai Gab 感谢您对我的问题的更正?你能帮我吗?
  • hai wruckie 很抱歉,因为我是这个论坛的新手。我需要更多的耐心来指导这个论坛,尤其是当我发布问题时。如果我在这个论坛上犯了很多错误,请原谅我。

标签: coreldraw


【解决方案1】:

如果您使用 Corel Draw X7,您应该能够在 %PROGRAMFILES%\Corel\CorelDRAW Graphics Suite X7\Data 找到对象模型的文档。遗憾的是,此文档无法在线提供以供参考或超链接。

在 Corel Draw X7 中,您在要导出的对象上调用 ExportEx,并以 StructExportOptions 对象的形式传递导出选项。您可以阅读上述文档中有关选项的所有信息。

文档示例:

Sub Test() 
 Dim d As Document 
 Dim s As Shape 
 Dim opt As New StructExportOptions 
 Dim pal As New StructPaletteOptions 
 Dim Filter As ExportFilter 
 Set d = CreateDocument 
 Set s = d.ActiveLayer.CreateEllipse2(4, 5, 2) 
 s.Fill.ApplyFountainFill CreateRGBColor(255, 0, 0), CreateRGBColor(0, 0, 0) 
 opt.AntiAliasingType = cdrNormalAntiAliasing 
 opt.ImageType = cdrRGBColorImage 
 opt.ResolutionX = 72 
 opt.ResolutionY = 72 
 pal.PaletteType = cdrPaletteOptimized 
 pal.NumColors = 16  
 pal.DitherType = cdrDitherNone 
 Set Filter = d.ExportEx("C:\Temp\Doc.gif", cdrGIF, cdrCurrentPage, opt, pal) 
 If Filter.ShowDialog() Then 
  If Not Filter.Interlaced Then 
   MsgBox "Interlaced is not specified... Fixing this." 
   Filter.Interlaced = True 
  End If 
  Filter.Finish 
 Else 
  MsgBox "Export canceled" 
 End If 
End Sub 

【讨论】:

    猜你喜欢
    • 2013-03-16
    • 2016-05-17
    • 2020-07-02
    • 1970-01-01
    • 1970-01-01
    • 2021-05-02
    • 1970-01-01
    • 2014-08-22
    相关资源
    最近更新 更多