Rectangle Tool

Draw perfect rectangles and squares with multiple drawing modes! Choose corner-to-corner, centre-out, or constrained (square) modes, and customise border thickness with precision controls.

How to Draw a Rectangle

  1. 1
    Select the Rectangle Tool
    Click on the Rectangle button in the left toolbar. It looks like a rectangle shape. The button will light up to show it's selected, and the bottom toolbar will show rectangle-specific controls.
  2. 2
    Choose Your Colour
    Pick a colour from the colour palette on the right side. Your rectangle's border will use this colour. The stroke is applied in real-time as you draw.
  3. 3
    Adjust Stroke Controls
    Use the 'Stroke' controls in the bottom toolbar. You can use either the slider (0-100 pixels) for quick adjustments or type an exact number in the input box. Both controls are synchronised - changing one updates the other instantly.
  4. 4
    Set Coordinate Precision (Optional)
    Adjust the 'Precision' setting (0-4 decimal places) to control how precisely your rectangle coordinates are calculated. Higher precision gives more exact positioning.
  5. 5
    Choose Your Drawing Mode
    Select how you want to draw: Normal (corner-to-corner), Centre-Out (from centre point), or Constrained (perfect squares). On desktop, use keyboard shortcuts. On touch devices, use the mode button or double-tap to cycle through modes.
  6. 6
    Click and Drag to Draw
    Click anywhere on the canvas where you want to start your rectangle. Hold down the mouse button and drag to make it the size you want. The behaviour depends on your selected mode. Release when it's perfect!

Drawing Modes

The Rectangle tool offers three powerful drawing modes to suit different needs. On desktop computers, use keyboard shortcuts whilst drawing. On touch devices, switch modes using the mode button or double-tap gesture.

Normal Mode
Default
Click and drag diagonally from one corner to the opposite corner. This is the standard way to draw rectangles - perfect for when you want to fit shapes into specific areas.
Centre-Out Mode
Alt/âŒĨ or Mode Button
Your click becomes the centre point, and you drag outward to set the size. Great when you know exactly where the centre should be! Perfect for symmetric designs and precise positioning.
Constrained Mode
Shift or Mode Button
Forces perfect squares by constraining both width and height to be equal. Excellent for creating perfectly square shapes regardless of how you drag!

Touch Device Gestures

On touch-enabled devices (tablets, phones, touch-screen laptops), you can use special gestures to control drawing modes:

👆👆
Double-Tap to Cycle Modes
Quickly tap twice (within 0.3 seconds) when the tool is active to cycle through modes: Normal → Centre-Out → Constrained → Normal. Visual feedback shows your current mode.
🔘
Mode Button
Use the mode cycling button in the bottom toolbar to switch between drawing modes. The button displays an icon showing the current mode.
đŸ’Ŧ
Visual Feedback
When you activate the tool or change modes, you'll see helpful messages like 'Rectangle tool ready' and 'Mode: Centre-out drawing'.
💡
Pro Tips for All Modes!
Desktop Users: Hold Alt/âŒĨ whilst drawing for centre-out mode, or Shift for constrained (perfect square) mode.
Touch Users: Double-tap quickly to cycle modes, or use the mode button in the toolbar.
Centre-Out Magic: This mode is brilliant for creating perfectly centred layouts and symmetric designs!

Tool Controls

Mode cycling button to switch between drawing styles:

  • Normal: Corner-to-corner (default)
  • Centre-Out: Draw from centre point outward
  • Constrained: Force perfect squares
  • Touch Optimised: Larger button size (44px+) on touch devices

Dual controls for maximum flexibility:

  • Slider: Drag from 0-100 pixels for quick adjustments
  • Number Input: Type exact values for precision
  • Live Sync: Both controls update each other automatically

Set decimal places (0-4) for coordinate precision. Higher values give more exact positioning but may result in longer coordinate numbers.

Keyboard Shortcuts

Desktop Controls

Draw from centre (Windows/Linux): Hold Alt
Draw from centre (Mac): Hold âŒĨ
Draw a perfect square: Hold Shift
Cancel current rectangle: Escape

Touch Device Controls

Cycle through drawing modes: Double-Tap (0.3s)
Switch modes: Mode Button
â„šī¸
How Keyboard Shortcuts Work
On desktop, keyboard shortcuts temporarily activate modes whilst you hold the key - perfect for quick one-off adjustments. On touch devices without keyboards, use the mode button or double-tap gesture to switch modes, and the mode stays active until you change it again.

Special Features

đŸŽ¯
Three Drawing Modes
Choose from Normal, Centre-Out, or Constrained modes to match your drawing style. Each mode is perfect for different situations and design needs.
đŸŽ¯
Smart Cleanup
Rectangles smaller than 0.5 pixels are automatically removed to keep your canvas clean. This prevents accidental tiny shapes from cluttering your artwork.
📐
Precise Measurements
Coordinate precision settings (0-4 decimal places) let you control exactly how precise your rectangle positioning is, perfect for technical drawings.
🎨
Live Colour Updates
Your rectangles automatically use the currently selected colour from the palette, and the colour updates in real-time as you draw.
⚡
Dual Input Controls
Both slider and number input for stroke width work together - change one and the other updates instantly. Perfect for both quick adjustments and precise values.
🔒
Safe Coordinates
Built-in coordinate safety limits prevent invalid or extreme values that could cause display issues, ensuring reliable performance.
📱
Touch-Optimised
All controls meet WCAG 2.1 AA accessibility standards with 44px+ touch targets. Double-tap gesture and mode button work perfectly on all touch devices.
đŸ’Ŧ
Visual Feedback
Get instant feedback when switching modes or activating tools. Messages show current mode and provide helpful hints for both desktop and touch users.

Technical Details

Drawing Modes: Normal (corner-to-corner), Centre-Out (from centre), Constrained (perfect squares)
Stroke Width Range: 0 to 100 pixels
Coordinate Precision: 0 to 4 decimal places
Minimum Valid Size: 0.5 pixels (smaller rectangles are auto-removed)
Touch Targets: Minimum 44px (WCAG 2.1 AA compliant)
Double-Tap Threshold: 300 milliseconds between taps
Shape Properties: Stroke-only (no fill), rounded line joins, scalable stroke
đŸŽ¯
Practice Ideas!
Try these exercises: Create a simple house outline with rectangles, make a comic strip panel layout, design a basic floor plan, create geometric patterns with overlapping squares using centre-out mode, or practise different stroke widths to see their effects. Remember to use Shift for perfect squares, and try Alt/âŒĨ for centre-based drawing!