Changeset 33180 in project


Ignore:
Timestamp:
02/13/16 16:22:04 (4 years ago)
Author:
John Croisant
Message:

sdl2: Docs for unscale procedures.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/sdl2

    r33179 r33180  
    530530
    531531
    532 <procedure>(color-scale   color scale) → sdl2:color</procedure>
    533 <procedure>(colour-scale  color scale) → sdl2:color</procedure>
    534 <procedure>(color-scale!  color scale #!optional dest) → dest</procedure>
    535 <procedure>(colour-scale! color scale #!optional dest) → dest</procedure>
    536 
    537 Efficiently scale (multiply) the RGBA values of {{color}} by {{scale}} (a float or integer).
    538 E.g. {{scale}} 0.5 halves the RGBA values, {{scale}} 2.0 doubles the values.
     532<procedure>(color-scale   color factor) → sdl2:color</procedure>
     533<procedure>(colour-scale  color factor) → sdl2:color</procedure>
     534<procedure>(color-scale!  color factor #!optional dest) → dest</procedure>
     535<procedure>(colour-scale! color factor #!optional dest) → dest</procedure>
     536
     537Efficiently multiply the RGBA values of {{color}} by {{factor}} (a float or integer).
     538E.g. {{factor}} 0.5 halves the RGBA values, {{factor}} 2.0 doubles the values.
    539539
    540540* {{color-scale}} and {{colour-scale}} return a new managed sdl2:color.
     
    33593359
    33603360
    3361 <procedure>(rect-scale  rect scale) → sdl2:rect</procedure>
    3362 <procedure>(rect-scale! rect scale #!optional dest) → dest</procedure>
    3363 
    3364 Efficiently scale (multiply) the X, Y, W, and H values of {{rect}} by {{scale}} (a float or integer).
    3365 E.g. {{scale}} 0.5 halves the values, {{scale}} 2.0 doubles the values.
     3361<procedure>(rect-scale  rect factor) → sdl2:rect</procedure>
     3362<procedure>(rect-scale! rect factor #!optional dest) → dest</procedure>
     3363
     3364Efficiently multiply the X, Y, W, and H values of {{rect}} by {{factor}} (a float or integer).
     3365E.g. {{factor}} 0.5 halves the values, {{factor}} 2.0 doubles the values.
    33663366sdl2:rect can only hold integer values, so the results will be truncated to integers.
    33673367The results will be clamped to the range -2147483648 to 2147483647.
     
    33693369* {{rect-scale}} returns a new managed sdl2:rect.
    33703370* {{rect-scale!}} modifies and returns {{dest}}.
     3371  If {{dest}} is omitted, {{rect}} is modified and returned.
     3372
     3373These procedures are available in '''sdl2 egg version 0.2.0 and higher'''.
     3374
     3375
     3376<procedure>(rect-unscale  rect factor) → sdl2:rect</procedure>
     3377<procedure>(rect-unscale! rect factor #!optional dest) → dest</procedure>
     3378
     3379Efficiently divide the X, Y, W, and H values of {{rect}} by {{factor}} (a float or integer).
     3380This is equivalent to {{(rect-scale rect (/ 1 factor))}},
     3381but is more convenient and efficient (especially if {{factor}} is an integer).
     3382
     3383These procedures signal an error if {{factor}} is 0.
     3384sdl2:rect can only hold integer values, so the results will be truncated to integers.
     3385The results will be clamped to the range -2147483648 to 2147483647.
     3386
     3387* {{rect-unscale}} returns a new managed sdl2:rect.
     3388* {{rect-unscale!}} modifies and returns {{dest}}.
    33713389  If {{dest}} is omitted, {{rect}} is modified and returned.
    33723390
     
    36153633
    36163634
    3617 <procedure>(point-scale  point scale) → sdl2:point</procedure>
    3618 <procedure>(point-scale! point scale #!optional dest) → dest</procedure>
    3619 
    3620 Efficiently scale (multiply) the X and Y values of {{point}} by {{scale}} (a float or integer).
    3621 E.g. {{scale}} 0.5 halves the values, {{scale}} 2.0 doubles the values.
     3635<procedure>(point-scale  point factor) → sdl2:point</procedure>
     3636<procedure>(point-scale! point factor #!optional dest) → dest</procedure>
     3637
     3638Efficiently multiply the X and Y values of {{point}} by {{factor}} (a float or integer).
     3639E.g. {{factor}} 0.5 halves the values, {{factor}} 2.0 doubles the values.
    36223640sdl2:point can only hold integer values, so the results will be truncated to integers.
    36233641The results will be clamped to the range -2147483648 to 2147483647.
     
    36273645* {{point-scale}} returns a new managed sdl2:point.
    36283646* {{point-scale!}} modifies and returns {{dest}}.
     3647  If {{dest}} is omitted, {{point}} is modified and returned.
     3648
     3649
     3650<procedure>(point-unscale  point factor) → sdl2:point</procedure>
     3651<procedure>(point-unscale! point factor #!optional dest) → dest</procedure>
     3652
     3653Efficiently divide the X and Y values of {{point}} by {{factor}} (a float or integer).
     3654This is equivalent to {{(point-scale point (/ 1 factor))}},
     3655but is more convenient and efficient (especially if {{factor}} is an integer).
     3656
     3657These procedures signal an error if {{factor}} is 0.
     3658sdl2:point can only hold integer values, so the results will be truncated to integers.
     3659The results will be clamped to the range -2147483648 to 2147483647.
     3660
     3661These procedures are available in '''sdl2 egg version 0.2.0 and higher'''.
     3662
     3663* {{point-unscale}} returns a new managed sdl2:point.
     3664* {{point-unscale!}} modifies and returns {{dest}}.
    36293665  If {{dest}} is omitted, {{point}} is modified and returned.
    36303666
Note: See TracChangeset for help on using the changeset viewer.