Skip to content

Commit 9db0e2c

Browse files
authored
Update README.md
1 parent eb0c912 commit 9db0e2c

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

README.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,17 @@
55
[![License](https://img.shields.io/badge/license-zlib-lightgrey.svg)](https://opensource.org/licenses/Zlib)
66
[![Twitter](https://img.shields.io/badge/[email protected])](http://twitter.com/simonwhitty)
77

8-
# SwiftDraw
9-
10-
A Swift library for parsing and drawing SVG images. SwiftDraw can also convert SVGs into SFSymbol, PNG, PDF and Swift source code.
8+
# Introduction
9+
**SwiftDraw** is Swift library for parsing and drawing SVG images and includes a command line tool to convert SVGs into SFSymbol, PNG, PDF and Swift source code.
10+
11+
- [Usage](#usage)
12+
- [iOS](#ios)
13+
- [macOS](#macos)
14+
- [Command Line Tool](#command-line-tool)
15+
- [Installation](#installation)
16+
- [Alignment](#alignment)
17+
- [Swift Code Generation](#swift-code-generation)
18+
- [Credits](#credits)
1119

1220
## Usage
1321

@@ -39,7 +47,7 @@ let svg = SVG(named: "sample.svg", in: .main)!
3947
imageView.image = svg.rasterize(insets: .init(top: -10, left: -10, bottom: -10, bottom: -10))
4048
```
4149

42-
## iOS
50+
### iOS
4351

4452
Create a `UIImage` directly from an SVG within a bundle, `Data` or file `URL`:
4553

@@ -48,7 +56,7 @@ import SwiftDraw
4856
let image = UIImage(svgNamed: "sample.svg")
4957
```
5058

51-
## macOS
59+
### macOS
5260

5361
Create an `NSImage` directly from an SVG within a bundle, `Data` or file `URL`:
5462

@@ -97,7 +105,7 @@ $ swiftdraw simple.svg --format png --scale 3x
97105
$ swiftdraw simple.svg --format pdf
98106
```
99107

100-
**Installation:**
108+
### Installation
101109

102110
You can install the `swiftdraw` command-line tool on macOS using [Homebrew](http://brew.sh/). Assuming you already have Homebrew installed, just type:
103111

@@ -147,7 +155,7 @@ Alignment: --insets 40,30,40,30
147155

148156
Variants can also be aligned using `--ultralightInsets` and `--blackInsets`.
149157

150-
### Source code generation
158+
### Swift Code Generation
151159

152160
Swift source code can also be generated from an SVG using the tool:
153161

0 commit comments

Comments
 (0)