Example #1
0
 void Translate()
 {
     if (_needPosition)
     {
         int horizontal = (int)_horizontal * ActiveDrawable.Width / 100;
         int vertical   = (int)_vertical * ActiveDrawable.Height / 100;
         SelectedLayer.Translate(horizontal, vertical);
     }
 }
Example #2
0
        void Offset()
        {
            var offset = Parameters["Ofst"] as ObjcParameter;

            if (offset != null)
            {
                double horizontal = offset.GetValueAsDouble("Hrzn");
                double vertical   = offset.GetValueAsDouble("Vrtc");

                int h = (int)(horizontal * ActiveDrawable.Width / 100);
                int v = (int)(vertical * ActiveDrawable.Height / 100);

                Console.WriteLine("Offset: {0}, {1}", h, v);

                SelectedLayer.Translate(h, v);
            }
        }