*
* Contact:
* GiWoong Kim <giwoong.kim@samsung.com>
- * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
+ * SangHo Park <sangho1206.park@samsung.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2013.07.11 at 12:12:25 PM KST
+// Generated on: 2014.12.18 at 11:23:37 AM KST
//
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <all>
* <element name="region" type="{http://www.tizen.org/emulator/skin/dbi}regionType"/>
+ * <element name="maskImage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </all>
* <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
* </restriction>
@XmlElement(required = true)
protected RegionType region;
+ protected String maskImage;
@XmlAttribute(name = "id", required = true)
protected int id;
}
/**
+ * Gets the value of the maskImage property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMaskImage() {
+ return maskImage;
+ }
+
+ /**
+ * Sets the value of the maskImage property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMaskImage(String value) {
+ this.maskImage = value;
+ }
+
+ /**
* Gets the value of the id property.
*
*/
import org.tizen.emulator.skin.layout.rotation.Rotation;
import org.tizen.emulator.skin.layout.rotation.SkinRotations;
import org.tizen.emulator.skin.log.SkinLogger;
+import org.tizen.emulator.skin.util.StringUtil;
public class ProfileSkinImageRegistry {
private static Logger logger = SkinLogger.getSkinLogger(
public enum SkinImageType {
PROFILE_IMAGE_TYPE_NORMAL,
- PROFILE_IMAGE_TYPE_PRESSED
+ PROFILE_IMAGE_TYPE_PRESSED,
+ DISPLAY_MASK_IMAGE
}
private Display display;
continue;
}
- String mainImage = imageList.getMainImage();
- String keyPressedImage = imageList.getKeyPressedImage();
-
if (targetRotation.getName().value().equals(rotation.getName().value())) {
- String mainKey = makeKey(id, SkinImageType.PROFILE_IMAGE_TYPE_NORMAL);
- skinImageMap.put(mainKey,
- new Image(display, skinPath + File.separator + mainImage));
-
- String pressedKey = makeKey(id, SkinImageType.PROFILE_IMAGE_TYPE_PRESSED);
- skinImageMap.put(pressedKey,
- new Image(display, skinPath + File.separator + keyPressedImage));
+ if (SkinImageType.PROFILE_IMAGE_TYPE_NORMAL == imageType) {
+ String mainImage = imageList.getMainImage();
+
+ String mainKey = makeKey(id, imageType);
+ skinImageMap.put(mainKey,
+ new Image(display, skinPath + File.separator + mainImage));
+ } else if (SkinImageType.PROFILE_IMAGE_TYPE_PRESSED == imageType) {
+ String keyPressedImage = imageList.getKeyPressedImage();
+
+ String pressedKey = makeKey(id, imageType);
+ skinImageMap.put(pressedKey,
+ new Image(display, skinPath + File.separator + keyPressedImage));
+ } else if (SkinImageType.DISPLAY_MASK_IMAGE == imageType) {
+ String displayMaskImage = rotation.getDisplay().getMaskImage();
+ if (StringUtil.isEmpty(StringUtil.nvl(displayMaskImage))) {
+ return null;
+ }
+
+ String displayMaskKey = makeKey(id, imageType);
+ skinImageMap.put(displayMaskKey,
+ new Image(display, skinPath + File.separator + displayMaskImage));
+ }
break;
}
}
logger.info("display bounds : " + displayBounds);
+ Image mask = imageRegistry.getSkinImage(rotationId, SkinImageType.DISPLAY_MASK_IMAGE);
+ if (mask != null) {
+ logger.info("display masking");
+
+ mask = SkinUtil.createScaledImage(
+ shell.getDisplay(), mask, rotationId, scale);
+ lcdCanvas.setRegion(SkinUtil.getTrimmedRegion(mask));
+
+ mask.dispose();
+ } else {
+ lcdCanvas.setRegion(null);
+ }
+
/* make profile skin */
Image originSkin = imageRegistry.getSkinImage(
rotationId, SkinImageType.PROFILE_IMAGE_TYPE_NORMAL);