How to change Panel Border Color

If you don’t want to make a custom panel as suggested in @Sinatr’s answer you can draw the border yourself: private void panel1_Paint(object sender, PaintEventArgs e) { ControlPaint.DrawBorder(e.Graphics, this.panel1.ClientRectangle, Color.DarkBlue, ButtonBorderStyle.Solid); }

Opengl pixel perfect 2D drawing

In OpenGL, lines are rasterized using the “Diamond Exit” rule. This is almost the same as saying that the end coordinate is exclusive, but not quite… This is what the OpenGL spec has to say: http://www.opengl.org/documentation/specs/version1.1/glspec1.1/node47.html Also have a look at the OpenGL FAQ, http://www.opengl.org/archives/resources/faq/technical/rasterization.htm, item “14.090 How do I obtain exact pixelization of lines?”. … Read more

Drawing a grid using CSS

Here is a simple CSS-only solution, using linear gradients: html, body, .grid { height: 100%; width: 100%; margin: 0; } .grid { background-image: repeating-linear-gradient(#ccc 0 1px, transparent 1px 100%), repeating-linear-gradient(90deg, #ccc 0 1px, transparent 1px 100%); background-size: 71px 71px; } <div class=”grid”></div>

Punch a hole in a rectangle overlay with HW acceleration enabled on View

Instead of allocating a new canvas on each repaint, you should be able to allocate it once and then reuse the canvas on each repaint. on init and on resize: Bitmap b = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888); Canvas c = new Canvas(b); on repaint: b.eraseColor(Color.TRANSPARENT); // needed if backColor is not opaque; thanks @JosephEarl c.drawColor(backColor); c.drawCircle(cx, … Read more

How to draw a rounded rectangle in c#

public static GraphicsPath RoundedRect(Rectangle bounds, int radius) { int diameter = radius * 2; Size size = new Size(diameter, diameter); Rectangle arc = new Rectangle(bounds.Location, size); GraphicsPath path = new GraphicsPath(); if (radius == 0) { path.AddRectangle(bounds); return path; } // top left arc path.AddArc(arc, 180, 90); // top right arc arc.X = bounds.Right – … Read more

Implementing smooth sketching and drawing on the element

I made something like this a while ago and turned it into a jquery plugin. have a look over here, if it’s what you’re after I’ll post a more detailed answer and dig out the simplified jquery version from my archives: http://jsfiddle.net/95tft/ EDIT OK, sorry I couldn’t do this yesterday: Originally the code above was … Read more

techhipbettruvabetnorabahisbahis forumu