class interface CUSTOM_MAPPING
creation
   make
feature(s) from CUSTOM_MAPPING
   --  from GENERAL
   copy (other: like Current)
      --  Update current object using fields of object attached
      --  to other, so as to yield equal objects.
      require
         other_not_void: other /= Void
      ensure
         is_equal: is_equal(other)
   is_equal (other: like Current): BOOLEAN
      --  Is other attached to an object considered equal to 
      --  current object ?
      require
         other_not_void: other /= Void
      ensure
         consistent: standard_is_equal(other) implies Result;
         symmetric: Result implies other.is_equal(Current)
feature(s) from CUSTOM_MAPPING
   --  Origin
   set_origin (pt: POINT)
      --  Set where the origin (0, 0) is relatively to the default origin 
      --  of the device, in logical coordinates.
      require
         valid_point: pt /= Void
feature(s) from CUSTOM_MAPPING
   --  Mode
   is_isotropic: BOOLEAN
      --  Isotropic mode?
   isotropic
      --  Isotropic mode (both axis scale proportionally, that is 
      --  squares remain square).
      --  This is the default.
   anisotropic
      --  Axis may be scaled independently.
feature(s) from CUSTOM_MAPPING
   --  Scale
   set_scale (nx: DOUBLE)
      --  Change x axis scale factor (1.0 = unchanged).
      --  If isotropic, changes both axis.
      --  Default: 1.0 (no change)
      require
         not_zero: nx /= 0.0
      ensure
         done: x_factor = nx;
         iso: is_isotropic implies y_factor = x_factor
feature(s) from CUSTOM_MAPPING
   --  Scale
   set_x_scale (nx: DOUBLE)
      --  Change x axis scale factor (1.0 = unchanged).
      --  If isotropic, changes both axis.
      --  Default: 1.0 (no change)
      require
         not_zero: nx /= 0.0
      ensure
         done: x_factor = nx;
         iso: is_isotropic implies y_factor = x_factor
   set_y_scale (ny: DOUBLE)
      --  Change y_axis scale factor.
      --  Default: 1.0 (no change)
      require
         not_iso: not is_isotropic;
         not_zero: ny /= 0.0
      ensure
         done: y_factor = ny
end of CUSTOM_MAPPING