-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e625a48
commit 2578d59
Showing
1 changed file
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,12 +107,18 @@ instance AttributeClass DashingA | |
type instance V DashingA = R2 | ||
|
||
instance Transformable DashingA where | ||
transform t (DashingA (Last (Dashing [Local w] (Local v)))) = | ||
DashingA (Last (Dashing [Local r] (Local s))) | ||
transform t (DashingA (Last (Dashing w v))) = | ||
DashingA (Last (Dashing (trLocals w) (trLocal v))) | ||
where | ||
r = avgScale t * w | ||
s = avgScale t * v | ||
transform _ l = l | ||
s = avgScale t | ||
|
||
trLocals [] = [] | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
byorgey
Member
|
||
trLocals ((Local h) : tl) = Local (h * s) : trLocals tl | ||
trLocals (x : tl) = x : trLocals tl | ||
|
||
trLocal (Local y) = Local (y * s) | ||
trLocal z = z | ||
|
||
|
||
getDashing :: DashingA -> Dashing | ||
getDashing (DashingA (Last d)) = d | ||
|
1 comment
on commit 2578d59
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea
trLocals = map trLocal