I have an combobox to select the cdrAntiAliasingType with the Values 0,1,2
How i can use this numbers to fill out the correct type in the method?
1 2 3 4 5 6 7 8 9 10 11 12
dplS = dplS.ConvertToBitmapEx(corel.cdrImageType.cdrCMYKColorImage, false, false, imgResolution, corel.cdrAntiAliasingType.cdrNormalAntiAliasing, false, true, 95); // corel class { public enum cdrAntiAliasingType { cdrNoAntiAliasing = 0, cdrNormalAntiAliasing = 1, cdrSupersampling = 2 } }
Please try simple using them like they are (0, 1, 2). Only to convert them from string. They are constants named by Corel in that specific way...
If you try in VBA `DebugPrint cdrNormalAntiAliasing` it will return 1...
Many thanks....
You can use a two columns combo, only the first one visible keeping the Corel constants (cdrNoAntiAliasing, cdrNormalAntiAliasing, cdrSupersampling) set in a way to return from the second hidden column containing (0, 1, 2)...
I have solved it like this
1 2 3 4 5 6 7 8 9 10
private int imgAntialiasingType = (int)corel.cdrAntiAliasingType.cdrNormalAntiAliasing; dplS = dplS.ConvertToBitmapEx(corel.cdrImageType.cdrGrayscaleImage, false, false, imgResolution, (corel.cdrAntiAliasingType)imgAntialiasingType, false, true, 95); private void imageAntiAliassingType_SelectionChanged(object sender, SelectionChangedEventArgs e) { imgAntialiasingType = imageAntiAliassingTypeComboBox.SelectedIndex; DuplicateMove(); }
Good...