Changeset View
Changeset View
Standalone View
Standalone View
libs/psd/asl/kis_asl_xml_parser.cpp
Show First 20 Lines • Show All 141 Lines • ▼ Show 20 Line(s) | 128 | while (!child.isNull()) { | |||
---|---|---|---|---|---|
142 | 142 | | |||
143 | } else if (type == "Descriptor" && key == "Clr ") { | 143 | } else if (type == "Descriptor" && key == "Clr ") { | ||
144 | colors.append(parseRGBColorObject(childEl)); | 144 | colors.append(parseRGBColorObject(childEl)); | ||
145 | 145 | | |||
146 | } else if (type == "Enum" && key == "Type") { | 146 | } else if (type == "Enum" && key == "Type") { | ||
147 | QString typeId = childEl.attribute("typeId", ""); | 147 | QString typeId = childEl.attribute("typeId", ""); | ||
148 | 148 | | |||
149 | if (typeId != "Clry") { | 149 | if (typeId != "Clry") { | ||
150 | warnKrita << "WARNING: Invalid typeId of a greadient stop type" << typeId; | 150 | warnKrita << "WARNING: Invalid typeId of a gradient stop type" << typeId; | ||
151 | } | 151 | } | ||
152 | 152 | | |||
153 | QString value = childEl.attribute("value", ""); | 153 | QString value = childEl.attribute("value", ""); | ||
154 | if (value == "BckC" || value == "FrgC") { | 154 | if (value == "BckC" || value == "FrgC") { | ||
155 | warnKrita << "WARNING: Using foreground/background colors in ASL gradients is not yet supported"; | 155 | warnKrita << "WARNING: Using foreground/background colors in ASL gradients is not yet supported"; | ||
156 | } | 156 | } | ||
157 | } | 157 | } | ||
158 | 158 | | |||
Show All 34 Lines | 192 | if (type == "Integer" && key == "Lctn") { | |||
193 | int value = KisDomUtils::toInt(childEl.attribute("value", "0")); | 193 | int value = KisDomUtils::toInt(childEl.attribute("value", "0")); | ||
194 | startLocations.append(qreal(value) / 4096.0); | 194 | startLocations.append(qreal(value) / 4096.0); | ||
195 | } else if (type == "Integer" && key == "Mdpn") { | 195 | } else if (type == "Integer" && key == "Mdpn") { | ||
196 | int value = KisDomUtils::toInt(childEl.attribute("value", "0")); | 196 | int value = KisDomUtils::toInt(childEl.attribute("value", "0")); | ||
197 | middleOffsets.append(qreal(value) / 100.0); | 197 | middleOffsets.append(qreal(value) / 100.0); | ||
198 | } else if (type == "UnitFloat" && key == "Opct") { | 198 | } else if (type == "UnitFloat" && key == "Opct") { | ||
199 | QString unit = childEl.attribute("unit", ""); | 199 | QString unit = childEl.attribute("unit", ""); | ||
200 | if (unit != "#Prc") { | 200 | if (unit != "#Prc") { | ||
201 | warnKrita << "WARNING: Invalid unit of a greadient stop transparency" << unit; | 201 | warnKrita << "WARNING: Invalid unit of a gradient stop transparency" << unit; | ||
202 | } | 202 | } | ||
203 | 203 | | |||
204 | qreal value = KisDomUtils::toDouble(childEl.attribute("value", "100")); | 204 | qreal value = KisDomUtils::toDouble(childEl.attribute("value", "100")); | ||
205 | transparencies.append(value / 100.0); | 205 | transparencies.append(value / 100.0); | ||
206 | } | 206 | } | ||
207 | 207 | | |||
208 | child = child.nextSibling(); | 208 | child = child.nextSibling(); | ||
209 | } | 209 | } | ||
▲ Show 20 Lines • Show All 347 Lines • Show Last 20 Lines |