README
¶
_ _ _
|_|_ _ _____| |_| |___
| | | | | . | | -_|
_| |___|_|_|_|___|_|___|
|___|
https://github.com/lucasepe/jumble
Create (not just) diagrams stitching, connecting and labelling images on a grid using HCL syntax (like terraform!).
515 Embedded cloud architecture icons! Ready to use!
- 225 AWS icons (uri = assets://aws_[KIND])
- 182 Azure icons (uri = assets://azure_[KIND])
- 108 Google Cloud icons (uri = assets://google_[KIND])
# AWS Lambda Authorizer
tile "icon" "lambda1" {
row = "${subtract(row("agw"), 1)}"
col = "${subtract(col("agw"), 2)}"
uri = "assets://aws_lambda"
}
- or you can use your local icons (uri = /path/to/my/ic.png)
- or you can use remote icons (uri = http://a.domain.com/img/ic.png)
👉 here an HCL example
./jumble -o sample.png ./screenshots/sample.hcl
Documentation
¶
Index ¶
- func ConnectorArrowDown() func(c *Connector)
- func ConnectorArrowLeft() func(c *Connector)
- func ConnectorArrowRight() func(c *Connector)
- func ConnectorArrowUp() func(c *Connector)
- func ConnectorColor(hex string) func(c *Connector)
- func FrameColor(hex string) func(f *Frame)
- func FrameDashes(val float64) func(f *Frame)
- func FrameOval(val bool) func(f *Frame)
- func FrameStroke(val bool) func(f *Frame)
- func FrameStrokeWidth(val float64) func(f *Frame)
- func GridBackground(hex string) func(*Grid)
- func GridMargin(val int) func(*Grid)
- func LabelAngle(val float64) func(*Label)
- func LabelBackground(hex string) func(*Label)
- func LabelColor(hex string) func(*Label)
- func LabelFontSize(val float64) func(*Label)
- func LoadFromAssets(uri string) (image.Image, error)
- func LoadImage(uri string) (image.Image, error)
- type Connector
- func CrossConnector(row, col int, opts ...func(*Connector)) Connector
- func ElbowLeftDownConnector(row, col int, opts ...func(*Connector)) Connector
- func ElbowLeftUpConnector(row, col int, opts ...func(*Connector)) Connector
- func ElbowRightDownConnector(row, col int, opts ...func(*Connector)) Connector
- func ElbowRightUpConnector(row, col int, opts ...func(*Connector)) Connector
- func HorizontalConnector(row, col int, opts ...func(*Connector)) Connector
- func TeeDownConnector(row, col int, opts ...func(*Connector)) Connector
- func TeeLeftConnector(row, col int, opts ...func(*Connector)) Connector
- func TeeRightConnector(row, col int, opts ...func(*Connector)) Connector
- func TeeUpConnector(row, col int, opts ...func(*Connector)) Connector
- func VerticalConnector(row, col int, opts ...func(*Connector)) Connector
- type Frame
- type Grid
- func (g *Grid) CellCenter(row, col int) gg.Point
- func (g *Grid) CellSize() float64
- func (g *Grid) Context() *gg.Context
- func (g *Grid) DrawBorder()
- func (g *Grid) DrawCoords()
- func (g *Grid) DrawGrid()
- func (g *Grid) EncodePNG(w io.Writer) error
- func (g *Grid) FillCell(row int, col int, color string) error
- func (g *Grid) SavePNG(filename string) error
- func (g *Grid) VerifyInBounds(row, col int) error
- type Icon
- type Label
- type Tile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectorArrowDown ¶
func ConnectorArrowDown() func(c *Connector)
ConnectorArrowDown enable the arrow down on the connector
func ConnectorArrowLeft ¶
func ConnectorArrowLeft() func(c *Connector)
ConnectorArrowLeft enable the arrow left on the connector
func ConnectorArrowRight ¶
func ConnectorArrowRight() func(c *Connector)
ConnectorArrowRight enable the arrow right on the connector
func ConnectorArrowUp ¶
func ConnectorArrowUp() func(c *Connector)
ConnectorArrowUp enable the arrow up on the connector
func ConnectorColor ¶
ConnectorColor sets the connector strokes color
func FrameStrokeWidth ¶
FrameStrokeWidth sets the stroke width
func GridBackground ¶
GridBackground sets the grid background color
func LabelAngle ¶
LabelAngle sets the label rotation angle in degree
func LabelBackground ¶
LabelBackground sets the label background color
func LabelFontSize ¶
LabelFontSize sets the label font size
func LoadFromAssets ¶
LoadFromAssets load an image from the embedded filesystem.
Types ¶
type Connector ¶
Connector connect two or more tiles.
func CrossConnector ¶
CrossConnector returns a tee connector (← ↑ ↓ →)
func ElbowLeftDownConnector ¶
ElbowLeftDownConnector returns left (←) down (↓) elbow connector
func ElbowLeftUpConnector ¶
ElbowLeftUpConnector returns left (←) up (↑) elbow connector
func ElbowRightDownConnector ¶
ElbowRightDownConnector returns a right (→) down (↓) elbow connector
func ElbowRightUpConnector ¶
ElbowRightUpConnector returns a right (→) up (↑) elbow connector
func HorizontalConnector ¶
HorizontalConnector returns a hotizontal connector
func TeeDownConnector ¶
TeeDownConnector returns a tee connector (← ↓ →)
func TeeLeftConnector ¶
TeeLeftConnector returns a tee connector (← ↑ ↓)
func TeeRightConnector ¶
TeeRightConnector returns a tee connector (↑ ↓ →)
func TeeUpConnector ¶
TeeUpConnector returns a tee connector (← ↑ →)
func VerticalConnector ¶
VerticalConnector returns a vertical connector
type Frame ¶
type Frame struct { Left int Top int Right int Bottom int // contains filtered or unexported fields }
Frame represents a frame on the grid.
type Grid ¶
type Grid struct {
// contains filtered or unexported fields
}
Grid represents the grid structure
func (*Grid) CellCenter ¶
CellCenter retuns the cell coordinates in the grid
func (*Grid) VerifyInBounds ¶
VerifyInBounds verify that the coordinates belongs to the grid
type Icon ¶
Icon wraps an image.