Skip to content

Commit

Permalink
make shapes mutable (#11)
Browse files Browse the repository at this point in the history
* make drawables as mutable

* update README
  • Loading branch information
Sid-Bhatia-0 authored Sep 4, 2021
1 parent 00cd11b commit bbcd63a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ This package provides fast drawing methods for the following simple shapes:

### Line

```
struct Line{I <: Integer} <: AbstractShape
```julia
mutable struct Line{I <: Integer} <: AbstractShape
i1::I
j1::I
i2::I
Expand All @@ -23,8 +23,8 @@ end

### Circle

```
struct Circle{I <: Integer} <: AbstractShape
```julia
mutable struct Circle{I <: Integer} <: AbstractShape
i_center::I
j_center::I
radius::I
Expand All @@ -35,8 +35,8 @@ end

### FilledCircle

```
struct FilledCircle{I <: Integer} <: AbstractShape
```julia
mutable struct FilledCircle{I <: Integer} <: AbstractShape
i_center::I
j_center::I
radius::I
Expand All @@ -47,8 +47,8 @@ end

### Rectangle

```
struct Rectangle{I <: Integer} <: AbstractShape
```julia
mutable struct Rectangle{I <: Integer} <: AbstractShape
i_top_left::I
j_top_left::I
height::I
Expand All @@ -60,8 +60,8 @@ end

### FilledRectangle

```
struct FilledRectangle{I <: Integer} <: AbstractShape
```julia
mutable struct FilledRectangle{I <: Integer} <: AbstractShape
i_top_left::I
j_top_left::I
height::I
Expand Down
4 changes: 2 additions & 2 deletions src/circle.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
struct Circle{I <: Integer} <: AbstractShape
mutable struct Circle{I <: Integer} <: AbstractShape
i_center::I
j_center::I
radius::I
end

struct FilledCircle{I <: Integer} <: AbstractShape
mutable struct FilledCircle{I <: Integer} <: AbstractShape
i_center::I
j_center::I
radius::I
Expand Down
2 changes: 1 addition & 1 deletion src/line.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
struct Line{I <: Integer} <: AbstractShape
mutable struct Line{I <: Integer} <: AbstractShape
i1::I
j1::I
i2::I
Expand Down
4 changes: 2 additions & 2 deletions src/rectangle.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
struct Rectangle{I <: Integer} <: AbstractShape
mutable struct Rectangle{I <: Integer} <: AbstractShape
i_top_left::I
j_top_left::I
height::I
width::I
end

struct FilledRectangle{I <: Integer} <: AbstractShape
mutable struct FilledRectangle{I <: Integer} <: AbstractShape
i_top_left::I
j_top_left::I
height::I
Expand Down

0 comments on commit bbcd63a

Please sign in to comment.