private void shadingToolStripButton_Click(object sender, EventArgs e) { if (diagram1.View.SelectionList != null && diagram1.View.SelectionList.Count > 0) { diagram1.BeginUpdate(); foreach (Node node in diagram1.View.SelectionList) { if (node is FilledPath) { FilledPath filledPath = (FilledPath)node; filledPath.EnableShading = !filledPath.EnableShading; } } diagram1.EndUpdate(); } }
public static void View_SelectionChanged(CollectionExEventArgs evt) { foreach (Node n in evt.Elements) { if (n is FilledPath) { FilledPath shapenode = (n as FilledPath); Color fillcolor = shapenode.FillStyle.Color; if (fillcolor == Color.Red) { shapenode.FillStyle.Color = Color.Green; } else if (fillcolor == Color.Green) { shapenode.FillStyle.Color = Color.Blue; } else { shapenode.FillStyle.Color = Color.Red; } } } }
private void drawUsingPolygon(DrawContext context, System.Drawing.Drawing2D.Matrix transform, ScenicColor color) { #if PENDING if (glyphPolygons == null) { glyphPolygons = new FilledPath[glyphCodes.Length]; for (int i = 0; i < glyphCodes.Length; i++) { System.Drawing.Drawing2D.Matrix temp_Matrix; temp_Matrix = new System.Drawing.Drawing2D.Matrix(); temp_Matrix.Translate((float) positions[i * 2], (float) positions[i * 2 + 1]); System.Drawing.Drawing2D.Matrix at = temp_Matrix; //UPGRADE_TODO: Interface 'java.awt.Shape' was converted to 'System.Drawing.Drawing2D.GraphicsPath' which has a different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1073_3"' System.Drawing.Drawing2D.GraphicsPath shape = TextRenderer.getGlyphOutline(font, at, glyphCodes[i]); Path path = new AWTShapePath(shape); glyphPolygons[i] = new FilledPath(path); } } System.Drawing.Drawing2D.Matrix temp = new System.Drawing.Drawing2D.Matrix(); for (int i = 0; i < glyphPolygons.Length; i++) { System.Drawing.Drawing2D.Matrix temp_Matrix2; temp_Matrix2 = new System.Drawing.Drawing2D.Matrix(); temp_Matrix2.Translate((float) positions[i * 2], (float) positions[i * 2 + 1]); System.Drawing.Drawing2D.Matrix at = temp_Matrix2; //UPGRADE_ISSUE: Method 'java.awt.geom.AffineTransform.setTransform' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtgeomAffineTransformsetTransform_javaawtgeomAffineTransform_3"' temp.setTransform(transform); //UPGRADE_TODO: Method 'java.awt.geom.AffineTransform.concatenate' was converted to 'System.Drawing.Drawing2D.Matrix.Multiply' which has a different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1073_javaawtgeomAffineTransformconcatenate_javaawtgeomAffineTransform_3"' temp.Multiply(at, System.Drawing.Drawing2D.MatrixOrder.Append); glyphPolygons[i].draw(context, temp, color); } #endif }