Changeset View
Changeset View
Standalone View
Standalone View
plugins/flake/pathshapes/enhancedpath/EnhancedPathParameter.cpp
Show First 20 Lines • Show All 126 Lines • ▼ Show 20 Line(s) | 98 | { | |||
---|---|---|---|---|---|
127 | case IdentifierWidth: | 127 | case IdentifierWidth: | ||
128 | return viewBox.width(); | 128 | return viewBox.width(); | ||
129 | break; | 129 | break; | ||
130 | case IdentifierHeight: | 130 | case IdentifierHeight: | ||
131 | return viewBox.height(); | 131 | return viewBox.height(); | ||
132 | break; | 132 | break; | ||
133 | case IdentifierLogwidth: | 133 | case IdentifierLogwidth: | ||
134 | // TODO: ? viewBox does not have any unit or const relation to mm | 134 | // TODO: ? viewBox does not have any unit or const relation to mm | ||
135 | return KoUnit::toMillimeter(viewBox.width()) * 100; | 135 | return KoUnit(KoUnit::Millimeter).toUserValue(viewBox.width()) * 100; | ||
136 | break; | 136 | break; | ||
137 | case IdentifierLogheight: | 137 | case IdentifierLogheight: | ||
138 | // TODO: ? viewBox does not have any unit or const relation to mm | 138 | // TODO: ? viewBox does not have any unit or const relation to mm | ||
139 | return KoUnit::toMillimeter(viewBox.height()) * 100; | 139 | return KoUnit(KoUnit::Millimeter).toUserValue(viewBox.height()) * 100; | ||
140 | break; | 140 | break; | ||
141 | default: | 141 | default: | ||
142 | break; | 142 | break; | ||
143 | } | 143 | } | ||
144 | return 0.0; | 144 | return 0.0; | ||
145 | } | 145 | } | ||
146 | 146 | | |||
147 | Identifier EnhancedPathNamedParameter::identifierFromString(const QString &text) | 147 | Identifier EnhancedPathNamedParameter::identifierFromString(const QString &text) | ||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |