示例#1
0
        /// <summary>
        /// 文字列型をPointd型に変換します。
        /// </summary>
        public override object ConvertFrom(ITypeDescriptorContext context,
                                           CultureInfo culture, object value)
        {
            var str = value as string;

            if (str != null)
            {
                return(Pointd.Parse(str));
            }

            return(base.ConvertFrom(context, culture, value));
        }
示例#2
0
 /// <summary>
 /// <paramref name="p"/>の値に座標変換を行います。
 /// </summary>
 public Pointd Transform(Pointd p)
 {
     return(new Pointd(
                p.X * this[0, 0] + p.Y * this[0, 1] + this[0, 3],
                p.X * this[1, 0] + p.Y * this[1, 1] + this[1, 3]));
 }