ea 0.6.53 → 0.6.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ea/sources/qea/diagram_builder.rb +14 -13
- data/lib/ea/version.rb +1 -1
- 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: 4b54f39e2dcdb482e55baad21977878ea11d4325ce84130b5a1be52d94461199
|
|
4
|
+
data.tar.gz: e06fe1f966c7b82cd9a4ee5e0cef8482f5bb83050a74354d10e674b80e6b1317
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a8c21021bb901b607f7e823bcd5caef4e10343177db98983f450a517c71d3ec929566c9ddc93dde15985bcc2fee88ffe469c164687589325d085bea94abf200d
|
|
7
|
+
data.tar.gz: 538ea960c3033cb4b16fdedccdcc9a27be793e1d6615ad836cd340aec103bca7c86937720e74d925a1f06653939015a8a303ada6a7056a0e7209308fde308fb1
|
|
@@ -111,26 +111,27 @@ module Ea
|
|
|
111
111
|
value.nil? || value.to_s.empty? ? nil : value
|
|
112
112
|
end
|
|
113
113
|
|
|
114
|
-
# EA stores the element font size in tenths of a point
|
|
115
|
-
#
|
|
116
|
-
#
|
|
117
|
-
#
|
|
118
|
-
#
|
|
119
|
-
#
|
|
120
|
-
#
|
|
121
|
-
#
|
|
122
|
-
#
|
|
123
|
-
|
|
114
|
+
# EA stores the element font size in tenths of a point and
|
|
115
|
+
# renders it through GDI's double rounding: pixel height =
|
|
116
|
+
# floor(tenths * 96 / 720), then point size =
|
|
117
|
+
# floor(pixels * 72 / 96). 70 -> 9px -> 6pt (F3660305 Text),
|
|
118
|
+
# 80 -> 10px -> 7pt, 90 -> 12px -> 9pt (4EBDE645's PI_*
|
|
119
|
+
# classes), 100 -> 13px -> 9pt (0D31AED1's all-100 elements
|
|
120
|
+
# publish 321 texts at 9pt), 120 -> 16px -> 12pt
|
|
121
|
+
# (412BC89E's Boundary title), 140 -> 18px -> 13pt.
|
|
122
|
+
# fontsz=0 ("use default", written back by the font dialog)
|
|
123
|
+
# renders at the 7pt theme size.
|
|
124
|
+
USE_DEFAULT_FONTSZ = [0].freeze
|
|
125
|
+
GDI_DPI = 96
|
|
124
126
|
|
|
125
127
|
def font_size_from(style_hash)
|
|
126
128
|
raw = style_hash[:fontsz]
|
|
127
129
|
return nil if raw.nil? || raw.to_s.empty?
|
|
128
130
|
|
|
129
|
-
return nil if raw.to_i.zero?
|
|
130
|
-
|
|
131
131
|
return nil if USE_DEFAULT_FONTSZ.include?(raw.to_i)
|
|
132
132
|
|
|
133
|
-
(raw.to_f /
|
|
133
|
+
pixels = (raw.to_f * GDI_DPI / 720).floor
|
|
134
|
+
(pixels * 72.0 / GDI_DPI).floor
|
|
134
135
|
end
|
|
135
136
|
|
|
136
137
|
def build_connectors(diagram_row)
|
data/lib/ea/version.rb
CHANGED