AI Summarydraw2d is a Go 2D vector graphics library with multiple backends: Source files include a copyright header and creation date: New files should follow the same pattern with the current date and author name.
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to add the "draw2d — Copilot Instructions" prompt rules to my project. Repository: https://github.com/llgcode/draw2d Please read the repo to find the rules/prompt file, then: 1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type) 2. If there's an existing rules file, merge the new rules in rather than overwriting 3. Confirm what was added
Description
2D rendering for different output (raster, pdf, svg)
Project Overview
draw2d is a Go 2D vector graphics library with multiple backends: • draw2d — Core package: interfaces (GraphicContext, PathBuilder), types (Matrix, Path), and font management • draw2dbase — Base implementations shared across backends (StackGraphicContext, flattener, stroker, dasher) • draw2dimg — Raster image backend (using freetype-go) • draw2dpdf — PDF backend (using gofpdf) • draw2dsvg — SVG backend • draw2dgl — OpenGL backend • draw2dkit — Drawing helpers (Rectangle, Circle, Ellipse, RoundedRectangle) • samples/ — Example drawings used as integration tests
Language and Conventions
• All code, comments, commit messages, and documentation must be written in English. • The project uses Go 1.20+ (see go.mod).
File Headers
Source files include a copyright header and creation date: `go // Copyright 2010 The draw2d Authors. All rights reserved. // created: 21/11/2010 by Laurent Le Goff ` New files should follow the same pattern with the current date and author name.
Comments
• Exported types, functions, and methods must have GoDoc comments. • Comments should start with the name of the thing being documented: `go // Rectangle draws a rectangle using a path between (x1,y1) and (x2,y2) func Rectangle(path draw2d.PathBuilder, x1, y1, x2, y2 float64) { ` • Package comments go in the main source file or a doc.go file.
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts