Class goog.math.Size
code »Class for representing sizes consisting of a width and height. Undefined width and height support is deprecated and results in compiler warning.
Constructor
Show:
Instance Methods
code »aspectRatio ( ) ⇒ number
number| Returns |
|---|
|
code »ceil ( ) ⇒ !goog.math.SizeClamps the width and height parameters upward to integer values.
!goog.math.Size| Returns |
|---|
|
code »clone ( ) ⇒ !goog.math.Size
!goog.math.Size| Returns |
|---|
|
code »fitsInside ( target ) ⇒ boolean
boolean| Parameters |
|---|
|
| Returns |
|
code »floor ( ) ⇒ !goog.math.SizeClamps the width and height parameters downward to integer values.
!goog.math.Size| Returns |
|---|
|
code »getLongest ( ) ⇒ number
number| Returns |
|---|
|
code »getShortest ( ) ⇒ number
number| Returns |
|---|
|
code »round ( ) ⇒ !goog.math.SizeRounds the width and height parameters to integer values.
!goog.math.Size| Returns |
|---|
|
code »scale ( sx, opt_sy ) ⇒ !goog.math.SizeScales this size by the given scale factors. The width and height are scaled
by sx and opt_sy respectively. If opt_sy is not
given, then sx is used for both the width and height.
!goog.math.Sizesx and opt_sy respectively. If opt_sy is not
given, then sx is used for both the width and height.code »scaleToFit ( target ) ⇒ !goog.math.SizeUniformly scales the size to fit inside the dimensions of a given size. The
original aspect ratio will be preserved.
This function assumes that both Sizes contain strictly positive dimensions.
!goog.math.Size| Parameters |
|---|
|
| Returns |
|
Instance Properties
Static Functions
code »goog.math.Size.equals ( a, b ) ⇒ booleanCompares sizes for equality.
boolean| Parameters |
|---|
|
| Returns |
|