void ILogicForCommand.editBorderColor(Interfaces.Color newcolor) { foreach (int index in CurientFigures) { // ВОТ ТУТ Я ВООБЩЕ НЕ УВЕРЕН Figures.getFigure(index).LineColor = newcolor; } }
private void DrawTriangle(OpenGL gl, trTriangle triangle, Interfaces.Color color) { gl.Color(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f); gl.Begin(OpenGL.GL_TRIANGLES); gl.Vertex(triangle.A.X, openGLControlView.Height - triangle.A.Y); gl.Vertex(triangle.B.X, openGLControlView.Height - triangle.B.Y); gl.Vertex(triangle.C.X, openGLControlView.Height - triangle.C.Y); gl.End(); }
private void button_choose_fill_color_Click(object sender, EventArgs e) { ColorDialog cd = new ColorDialog(); if (cd.ShowDialog() == System.Windows.Forms.DialogResult.OK) { fillColor = new Interfaces.Color(cd.Color.R, cd.Color.G, cd.Color.B, cd.Color.A); button_choose_fill_color.BackColor = cd.Color; } }
private void button_choose_line_color_Click(object sender, EventArgs e) { ColorDialog cd = new ColorDialog(); if (cd.ShowDialog() == System.Windows.Forms.DialogResult.OK) { borderColor = new Interfaces.Color(cd.Color.R, cd.Color.G, cd.Color.B, cd.Color.A); button_choose_line_color.BackColor = cd.Color; } isChangedOpenGLView = true; }
private void button_choose_fill_color_Click(object sender, EventArgs e) { ColorDialog cd = new ColorDialog(); if (cd.ShowDialog() == System.Windows.Forms.DialogResult.OK) { fillColor = new Interfaces.Color(cd.Color.R, cd.Color.G, cd.Color.B, cd.Color.A); button_choose_fill_color.BackColor = cd.Color; if (isModeSelectFigures) { //editCommand.Execute(); } } isChangedOpenGLView = true; }
private void button_choose_line_color_Click(object sender, EventArgs e) { ColorDialog cd = new ColorDialog(); if (cd.ShowDialog() == System.Windows.Forms.DialogResult.OK) { borderColor = new Interfaces.Color(cd.Color.R, cd.Color.G, cd.Color.B, cd.Color.A); button_choose_line_color.BackColor = cd.Color; if (editCommand.CanExecute(null)) { editCommand.Execute(new Tuple <Interfaces.Color, bool>(borderColor, false)); } } isChangedOpenGLView = true; }
private void DrawLine(OpenGL gl, Interfaces.Point firstPoint, Interfaces.Point lastPoint, Interfaces.Color color) { gl.Begin(OpenGL.GL_LINES); gl.Color(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f); gl.Vertex(firstPoint.X, openGLControlView.Height - firstPoint.Y); gl.Color(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f); gl.Vertex(lastPoint.X, openGLControlView.Height - lastPoint.Y); gl.End(); }