private void makeShape() { Bitmap bmp = new Bitmap(Allocation.Width, Allocation.Height); Graphics g = Graphics.FromImage(bmp); g.CompositingQuality = CompositingQuality.HighQuality; g.SmoothingMode = SmoothingMode.HighQuality; GraphUtil g2 = new HollyLibrary.GraphUtil(g); Brush b = new SolidBrush(Color.Red); // g2.FillRoundRectangle(b, 0, tail_height, bmp.Width, bmp.Height - tail_height, round_rect_angle); Point[] points = new Point[] { new Point(tail_left, tail_height), new Point(tail_left, 0), new Point(tail_width, tail_height) }; g.FillPolygon(b, points); g.Dispose(); WinUtil.ModifyWindowShape(bmp, this); }
private void makeShape() { Bitmap bmp = new Bitmap( Allocation.Width, Allocation.Height); Graphics g = Graphics.FromImage( bmp ); g.CompositingQuality = CompositingQuality.HighQuality; g.SmoothingMode = SmoothingMode.HighQuality; GraphUtil g2 = new HollyLibrary.GraphUtil( g ); Brush b = new SolidBrush( Color.Red ); // g2.FillRoundRectangle( b, 0, tail_height, bmp.Width, bmp.Height - tail_height, round_rect_angle ); Point[] points = new Point[] { new Point( tail_left , tail_height ), new Point( tail_left , 0 ), new Point( tail_width , tail_height ) }; g.FillPolygon( b, points ); g.Dispose(); WinUtil.ModifyWindowShape( bmp, this ); }