public void DrawEditable(IEntityState _state) { State state = _state as State; Drawing.Bitmap(state.Bounds.Location, state.Bounds.Size, state.Rotation, state.BitmapAlpha, TextureID); DrawHandle(state, Color.Cyan); }
private void GLContext_Paint(object sender, PaintEventArgs e) { GLContext.MakeCurrent(); GL.ClearColor(LatestColor.X, LatestColor.Y, LatestColor.Z, LatestColor.W); GL.Clear(ClearBufferMask.ColorBufferBit); GL.UseProgram(shaderProgram); int location = GL.GetUniformLocation(shaderProgram, "Hue"); GL.Uniform1(location, Hue); GL.Begin(PrimitiveType.Quads); GL.Vertex2(0f, 0f); GL.Vertex2(258f, 0f); GL.Vertex2(258f, 258f); GL.Vertex2(0f, 258f); GL.End(); GL.UseProgram(0); Drawing.Bitmap(new PointF(265.0f, 0.0f), new SizeF(20.0f, 258.0f), 0, 255, HueBar); GLContext.SwapBuffers(); }
public void DrawLabel(int i, float SplitterDistance, bool Hovered, bool HoveredLayerOverVis) { int x = Depth * 9; int On, OnHover; int Off, OffHover; On = Program.MainTimeline.VisibilityBitmapOn; OnHover = Program.MainTimeline.VisibilityBitmapOn_hover; Off = Program.MainTimeline.VisibilityBitmapOff; OffHover = Program.MainTimeline.VisibilityBitmapOff_hover; Drawing.Rectangle(new PointF(x, 16 * (i + 1)), new SizeF(SplitterDistance - x, 16), TimelineColor); Drawing.RectangleLine(new PointF(x, 16 * (i + 1)), new SizeF(SplitterDistance - x, 16), 1, Color.Black); Drawing.TextRect(Name, new PointF(x + 1, 16 * (i + 1) + 1), new SizeF(SplitterDistance - x, 16), new Font("Segoe UI", 9), Color.Black, i == 0 ? StringAlignment.Center : StringAlignment.Near); if (x > 0) { Drawing.Rectangle(new PointF(0, 16 * (i + 1)), new SizeF(x, 17), Color.FromArgb(220, 220, 220)); } if (Hovered || !Visible) { Drawing.Bitmap(new PointF(SplitterDistance - 15, 16 * (i + 1) + 2), new Size(14, 14), 0, 255, Visible ? (HoveredLayerOverVis ? OnHover : On) : (HoveredLayerOverVis ? OffHover : Off)); } if (Type == LayerTypeEnum.Category && !Collapsed) { for (int j = 0; j < Children.Count; j++) { Children[j].DrawLabel(i + j + 1, SplitterDistance, Hovered, HoveredLayerOverVis); } } }
public void Draw(IEntityState _state) { State state = _state as State; Drawing.Bitmap(state.Bounds.Location, state.Bounds.Size, state.Rotation, state.BitmapAlpha, TextureID); }