예제 #1
0
        private void oleShapesToCurves(corel.Shape s)
        {
            if (s.Type == Corel.Interop.VGCore.cdrShapeType.cdrOLEObjectShape)
            {
                corel.Rect  oleRect;
                corel.Shape vectShape;

                corel.Shape oleShape = s;
                oleRect = oleShape.BoundingBox;

                oleShape.Copy();
                corelApp.ActiveLayer.PasteSpecial("Metafile");
                vectShape = corelApp.ActiveSelection.Shapes.First;
                //vectShape.ConvertToCurves();
                vectShape.RotationAngle = oleShape.RotationAngle;
                vectShape.SetPosition(oleRect.Left, oleRect.Top);
                vectShape.SetSize(oleRect.Width, oleRect.Height);

                vectShape.TreeNode.LinkAfter(oleShape.TreeNode);
                oleShape.Delete();
            }
        }
예제 #2
0
        public bool editLatexObject(Corel.Interop.VGCore.Shape s)
        {
            LatexEquation eq = ShapeTags.getLatexEquation(s);

            if (eq != null)
            {
                m_dialog.init(eq, "Edit latex object");

                m_dialog.ShowDialog();
                if (m_dialog.Result == System.Windows.Forms.DialogResult.OK)
                {
                    Corel.Interop.VGCore.Shape latexObj = m_dialog.LatexEquation.m_shape;
                    if (latexObj != null)
                    {
                        latexObj.TransformationMatrix = s.TransformationMatrix;
                        s.Delete();
                    }
                }
                return(true);
            }
            return(false);
        }
예제 #3
0
        private void testMethod(corel.Shape s)
        {
            //s.Fill.UniformColor.CMYKAssign(0, 100, 50, 0);

            if (s.Type == corel.cdrShapeType.cdrGuidelineShape)
            {
                s.Delete();
            }

            //string str = "";
            //corel.SeparationPlates plates;
            //corel.SeparationPlate plate;
            //plates = corelApp.ActiveDocument.PrintSettings.Separations.Plates;

            //for (int j = 1; j <= plates.Count; j++)
            //{
            //	plate = plates[j];
            //	if (plate.Enabled)
            //		str = str + plate.Color.ToString() + "\n";
            //}
            //MessageBox.Show(str);
        }