private PropertyValue GetTransformMap() { var transformMap = new PropertyMap(); if (!noOffset.Equals(Offset)) { var temp = new Vector2((int)VisualTransformPolicyType.Absolute, (int)VisualTransformPolicyType.Absolute); transformMap[(int)VisualTransformPropertyType.OffsetPolicy] = new PropertyValue(temp); transformMap[(int)VisualTransformPropertyType.Offset] = PropertyValue.CreateWithGuard(Offset); temp.Dispose(); } if (!noExtents.Equals(Extents)) { transformMap[(int)VisualTransformPropertyType.ExtraSize] = PropertyValue.CreateWithGuard(Extents); } transformMap[(int)VisualTransformPropertyType.Origin] = new PropertyValue((int)Visual.AlignType.Center); transformMap[(int)VisualTransformPropertyType.AnchorPoint] = new PropertyValue((int)Visual.AlignType.Center); var ret = new PropertyValue(transformMap); transformMap.Dispose(); return(ret); }
protected override PropertyMap GetPropertyMap() { var map = base.GetPropertyMap(); map[Visual.Property.Type] = new PropertyValue((int)Visual.Type.Image); if (Rectangle.IsNullOrZero(Border)) { map[Visual.Property.Type] = new PropertyValue((int)Visual.Type.Image); } else { map[Visual.Property.Type] = new PropertyValue((int)Visual.Type.NPatch); } map[ImageVisualProperty.Border] = PropertyValue.CreateWithGuard(Border); string urlString = Url; if (Url.StartsWith("*Resource*")) { string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource; urlString = Url.Replace("*Resource*", resource); } map[ImageVisualProperty.URL] = PropertyValue.CreateWithGuard(urlString); return(map); }
internal TextShadow(TextShadow other) { propertyMap = new PropertyMap(); Color = other.Color; propertyMap["color"] = PropertyValue.CreateWithGuard(Color); Offset = other.Offset; propertyMap["offset"] = PropertyValue.CreateWithGuard(Offset); BlurRadius = other.BlurRadius; propertyMap["blurRadius"] = new PropertyValue(BlurRadius); }
public TextShadow(Color color, Vector2 offset, float blurRadius) { propertyMap = new PropertyMap(); Color = color; propertyMap["color"] = PropertyValue.CreateWithGuard(Color); Offset = offset; propertyMap["offset"] = PropertyValue.CreateWithGuard(Offset); BlurRadius = blurRadius; propertyMap["blurRadius"] = new PropertyValue(BlurRadius); }
private void UpdateBorder() { if (Rectangle.IsNullOrZero(border)) { propertyMap[Visual.Property.Type] = new PropertyValue((int)Visual.Type.Image); } else { propertyMap[Visual.Property.Type] = new PropertyValue((int)Visual.Type.NPatch); } propertyMap[ImageVisualProperty.Border] = PropertyValue.CreateWithGuard(border); OnPropertyChanged?.Invoke(this); }
internal TextShadow(TextShadow other, PropertyChangedCallback callback = null) { propertyMap = new PropertyMap(); Color = other.Color; propertyMap["color"] = PropertyValue.CreateWithGuard(Color); Offset = other.Offset; propertyMap["offset"] = PropertyValue.CreateWithGuard(Offset); BlurRadius = other.BlurRadius; propertyMap["blurRadius"] = new PropertyValue(BlurRadius); OnPropertyChanged = callback; }
private PropertyValue GetTransformMap() { var transformMap = new PropertyMap(); if (!offset.Equals(noOffset)) { transformMap[(int)VisualTransformPropertyType.OffsetPolicy] = new PropertyValue(absoluteTransformPolicy); transformMap[(int)VisualTransformPropertyType.Offset] = PropertyValue.CreateWithGuard(offset); } if (!scale.Equals(noScale)) { transformMap[(int)VisualTransformPropertyType.Size] = PropertyValue.CreateWithGuard(scale); } return(transformMap.Count() == 0 ? new PropertyValue() : new PropertyValue(transformMap)); }
private PropertyValue GetTransformMap() { var transformMap = new PropertyMap(); if (!Offset.Equals(noOffset)) { transformMap[(int)VisualTransformPropertyType.OffsetPolicy] = new PropertyValue(new Vector2((int)VisualTransformPolicyType.Absolute, (int)VisualTransformPolicyType.Absolute)); transformMap[(int)VisualTransformPropertyType.Offset] = PropertyValue.CreateWithGuard(Offset); } if (!Extents.Equals(noExtents)) { transformMap[(int)VisualTransformPropertyType.ExtraSize] = PropertyValue.CreateWithGuard(Extents); } return(transformMap.Count() == 0 ? new PropertyValue() : new PropertyValue(transformMap)); }
protected override PropertyMap GetPropertyMap() { var map = base.GetPropertyMap(); map[Visual.Property.Type] = new PropertyValue((int)Visual.Type.Image); if (Rectangle.IsNullOrZero(Border)) { map[Visual.Property.Type] = new PropertyValue((int)Visual.Type.Image); } else { map[Visual.Property.Type] = new PropertyValue((int)Visual.Type.NPatch); } map[ImageVisualProperty.Border] = PropertyValue.CreateWithGuard(Border); map[ImageVisualProperty.URL] = PropertyValue.CreateWithGuard(Url); return(map); }
private PropertyValue GetTransformMap(BaseComponents.View attachedView) { var transformMap = new PropertyMap(); if (!offset.Equals(noOffset)) { transformMap[(int)VisualTransformPropertyType.OffsetPolicy] = new PropertyValue(absoluteTransformPolicy); transformMap[(int)VisualTransformPropertyType.Offset] = PropertyValue.CreateWithGuard(offset); } if (!extents.Equals(noExtents)) { var viewSize = new Vector2(attachedView.GetRelayoutSize(DimensionType.Width), attachedView.GetRelayoutSize(DimensionType.Height)); var shadowSize = viewSize + extents; transformMap[(int)VisualTransformPropertyType.SizePolicy] = new PropertyValue(absoluteTransformPolicy); transformMap[(int)VisualTransformPropertyType.Size] = PropertyValue.CreateWithGuard(shadowSize); } return(transformMap.Count() == 0 ? new PropertyValue() : new PropertyValue(transformMap)); }
private void UpdateColor() { propertyMap[ColorVisualProperty.MixColor] = PropertyValue.CreateWithGuard(color); OnPropertyChanged?.Invoke(this); }
private void UpdateBorder() { propertyMap[ImageVisualProperty.Border] = PropertyValue.CreateWithGuard(border); OnPropertyChanged?.Invoke(this); }
private void UpdateUrl() { propertyMap[ImageVisualProperty.URL] = PropertyValue.CreateWithGuard(url); OnPropertyChanged?.Invoke(this); }