[Solved] Different shaped divs [closed]

There are several ways to do this. Old School One way would be to crop the overlaid image so that it has a triangle cut off and replaced by transparency. This would work in any browser that supported .pngs, however, the downside would be that for each image you’d need to create a new crop. … Read more

[Solved] How to create PictureBoxes with shapes based on a Picture

My solution to this is a new class: class ShapedPictureBox : PictureBox { public ShapedPictureBox() { } public Color transparentColor = Color.White; public void updateShape() { if(this.Image = null) return; Bitmap bitmap = new Bitmap(this.Image); System.Drawing.Drawing2D.GraphicsPath graphicsPath = new System.Drawing.Drawing2D.GraphicsPath(); for(int x = 0; x < this.Image.Width; x++) for(int y = 0; y < this.Image.Height; … Read more

[Solved] how to output a user selected shape & color, whose location and dimensions depend upon the coordinate location of user clicks

The following is a suggested implementation, also incorporating the good guidance you got from Frakcool: import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.GridLayout; import java.awt.Point; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.geom.Ellipse2D; import java.awt.geom.Rectangle2D; import java.util.HashMap; import java.util.Map; import javax.swing.ButtonGroup; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextArea; import javax.swing.JToggleButton; … Read more