rubysketch 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +5 -1
- data/VERSION +1 -1
- data/lib/rubysketch/processing.rb +53 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35b603297108689f78cc6cd1b7c1577c314e3658763889cd751c57351d0ded11
|
4
|
+
data.tar.gz: adf06019c19a710d427c39ccf6febfa7aa01b8c01e748cd6061fff27bf286445
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a427610a5a9c648ce0b301d903f2c7b70a9fc18ae9b9286fe896151485d6df7ef3a2b15cb823d978b790f267367c42686e3fc651d86a21168f5a24d4cd76c7ab
|
7
|
+
data.tar.gz: 17a16b9259156c098ba2a34db1aac50cd7483481734b0c1bcb839870313fdb08c216ae0421c21324f59366e1c5b72bfccee35b81bd426edaba05db0d03acaa6e
|
data/ChangeLog.md
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
# RubySketch ChangeLog
|
2
2
|
|
3
3
|
|
4
|
+
## [0.2.7] - 2020-04-17
|
5
|
+
|
6
|
+
- add strokeCap() and strokeJoin()
|
7
|
+
|
8
|
+
|
4
9
|
## [0.2.6] - 2020-04-17
|
5
10
|
|
6
11
|
- push(), pushMatrix() and pushStyle() take block to automatic pop
|
7
|
-
- add stroke_cap() and stroke_join()
|
8
12
|
- refine startup process
|
9
13
|
- add curve() and bezier()
|
10
14
|
- add imageMode(), Image#resize(), Image#copy() and copy()
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.7
|
@@ -12,27 +12,54 @@ module RubySketch
|
|
12
12
|
TWO_PI = PI * 2
|
13
13
|
TAU = PI * 2
|
14
14
|
|
15
|
-
# RGB mode for colorMode()
|
15
|
+
# RGB mode for colorMode().
|
16
16
|
#
|
17
17
|
RGB = :RGB
|
18
18
|
|
19
|
-
# HSB mode for colorMode()
|
19
|
+
# HSB mode for colorMode().
|
20
20
|
#
|
21
21
|
HSB = :HSB
|
22
22
|
|
23
|
-
# Radian mode for angleMode()
|
23
|
+
# Radian mode for angleMode().
|
24
24
|
#
|
25
25
|
RADIANS = :RADIANS
|
26
26
|
|
27
|
-
# Degree mode for angleMode()
|
27
|
+
# Degree mode for angleMode().
|
28
28
|
#
|
29
29
|
DEGREES = :DEGREES
|
30
30
|
|
31
|
+
# Mode for rectMode(), ellipseMode() and imageMode().
|
32
|
+
#
|
31
33
|
CORNER = :CORNER
|
34
|
+
|
35
|
+
# Mode for rectMode(), ellipseMode() and imageMode().
|
36
|
+
#
|
32
37
|
CORNERS = :CORNERS
|
38
|
+
|
39
|
+
# Mode for rectMode(), ellipseMode() and imageMode().
|
40
|
+
#
|
33
41
|
CENTER = :CENTER
|
42
|
+
|
43
|
+
# Mode for rectMode() and ellipseMode().
|
44
|
+
#
|
34
45
|
RADIUS = :RADIUS
|
35
46
|
|
47
|
+
# Mode for strokeCap().
|
48
|
+
#
|
49
|
+
BUTT = :butt
|
50
|
+
|
51
|
+
# Mode for strokeJoin().
|
52
|
+
#
|
53
|
+
MITER = :miter
|
54
|
+
|
55
|
+
# Mode for strokeCap() and strokeJoin().
|
56
|
+
#
|
57
|
+
ROUND = :round
|
58
|
+
|
59
|
+
# Mode for strokeCap() and strokeJoin().
|
60
|
+
#
|
61
|
+
SQUARE = :square
|
62
|
+
|
36
63
|
# @private
|
37
64
|
DEG2RAD__ = PI / 180.0
|
38
65
|
|
@@ -700,6 +727,28 @@ module RubySketch
|
|
700
727
|
nil
|
701
728
|
end
|
702
729
|
|
730
|
+
# Sets stroke cap mode.
|
731
|
+
#
|
732
|
+
# @param cap [BUTT, ROUND, SQUARE]
|
733
|
+
#
|
734
|
+
# @return [nil] nil
|
735
|
+
#
|
736
|
+
def strokeCap (cap)
|
737
|
+
@painter__.stroke_cap cap
|
738
|
+
nil
|
739
|
+
end
|
740
|
+
|
741
|
+
# Sets stroke join mode.
|
742
|
+
#
|
743
|
+
# @param join [MITER, ROUND, SQUARE]
|
744
|
+
#
|
745
|
+
# @return [nil] nil
|
746
|
+
#
|
747
|
+
def strokeJoin (join)
|
748
|
+
@painter__.stroke_join join
|
749
|
+
nil
|
750
|
+
end
|
751
|
+
|
703
752
|
# Disables filling.
|
704
753
|
#
|
705
754
|
# @return [nil] nil
|