#include <size_f.h>
Stores an ordered pair of floating-point, which specify a height and width. 
- Namespace
 - xtd::drawing 
 
- Library
 - xtd.drawing 
 
 
Inherits xtd::object.
 | 
|   | size_f ()=default | 
|   | Initializes a new instance of the Size class that has a Height and Width value of 0.  
  | 
|   | 
|   | size_f (const xtd::drawing::point_f &point) | 
|   | Initializes a new instance of the Size class from the specified Point class.  
  | 
|   | 
|   | size_f (float width, float height) | 
|   | Initializes a new instance of the Size class from the specified dimensions.  
  | 
|   | 
| float  | height () const | 
|   | Gets he vertical component of this Size Class.  
  | 
|   | 
| void  | height (float height) | 
|   | Sets the vertical component of this Size Class.  
  | 
|   | 
| bool  | is_empty () const | 
|   | Tests whether this Size class has width and height of 0.  
  | 
|   | 
| xtd::ustring  | to_string () const noexcept override | 
|   | Creates a human-readable string that represents this size class.  
  | 
|   | 
| float  | width () const | 
|   | Gets the horizontal component of this Size class.  
  | 
|   | 
| void  | width (float width) | 
|   | Sets the horizontal component of this Size class.  
  | 
|   | 
|   | object ()=default | 
|   | Create a new instance of the ultimate base class object.  
  | 
|   | 
| virtual bool  | equals (const object &obj) const noexcept | 
|   | Determines whether the specified object is equal to the current object.  
  | 
|   | 
| virtual size_t  | get_hash_code () const noexcept | 
|   | Serves as a hash function for a particular type.  
  | 
|   | 
| template<typename object_t >  | 
| std::unique_ptr< object_t >  | memberwise_clone () const | 
|   | Gets the type of the current instance.  
  | 
|   | 
| virtual xtd::ustring  | to_string () const noexcept | 
|   | Returns a std::string that represents the current object.  
  | 
|   | 
◆ size_f() [1/3]
  
  
      
        
          | xtd::drawing::size_f::size_f  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
default   | 
  
 
Initializes a new instance of the Size class that has a Height and Width value of 0. 
 
 
◆ size_f() [2/3]
Initializes a new instance of the Size class from the specified Point class. 
- Parameters
 - 
  
    | point | The Point class from which to initialize this Size class  | 
  
   
 
 
◆ size_f() [3/3]
  
  
      
        
          | xtd::drawing::size_f::size_f  | 
          ( | 
          float  | 
          width,  | 
         
        
           | 
           | 
          float  | 
          height  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Initializes a new instance of the Size class from the specified dimensions. 
- Parameters
 - 
  
    | width | The width component of the new Size  | 
    | height | The height component of the new Size  | 
  
   
 
 
◆ add()
Adds the width and height of one Size class to the width and height of another size class. 
- Parameters
 - 
  
    | size1 | The first Size class to add.  | 
    | size2 | The second Size class to add.  | 
  
   
- Returns
 - Size A Size class that is the result of the addition operation. 
 
 
 
◆ height() [1/2]
  
  
      
        
          | float xtd::drawing::size_f::height  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Gets he vertical component of this Size Class. 
- Returns
 - int The vertical component of this Size class, typically measured in pixels. 
 
 
 
◆ height() [2/2]
  
  
      
        
          | void xtd::drawing::size_f::height  | 
          ( | 
          float  | 
          height | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Sets the vertical component of this Size Class. 
- Returns
 - int The vertical component of this Size class, typically measured in pixels. 
 
 
 
◆ is_empty()
  
  
      
        
          | bool xtd::drawing::size_f::is_empty  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Tests whether this Size class has width and height of 0. 
- Returns
 - bool Returns true when this Size class has both a width and height of 0; otherwise, false. 
 
 
 
◆ subtract()
Returns the result of subtracting specified size from the specified size. 
- Parameters
 - 
  
    | sz1 | The Size to be subtracted from.  | 
    | sz2 | The Size to subtract from the Size.  | 
  
   
- Returns
 - The Size that is the result of the subtraction operation. 
 
- Exceptions
 - 
  
    | ArgumentNullException | sz1 or sz2 are null.  | 
  
   
 
 
◆ to_string()
  
  | 
      
   | 
  
inlineoverridevirtualnoexcept   | 
  
 
Creates a human-readable string that represents this size class. 
- Returns
 - string A string that represents this size. 
 
Reimplemented from xtd::object.
 
 
◆ width() [1/2]
  
  
      
        
          | float xtd::drawing::size_f::width  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Gets the horizontal component of this Size class. 
- Returns
 - int The horizontal component of this Size class, typically measured in pixels. 
 
 
 
◆ width() [2/2]
  
  
      
        
          | void xtd::drawing::size_f::width  | 
          ( | 
          float  | 
          width | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Sets the horizontal component of this Size class. 
- Returns
 - int The horizontal component of this Size class, typically measured in pixels. 
 
 
 
◆ empty
Gets a Size class that has a Height and Width value of 0. This field is constant. 
 
 
The documentation for this class was generated from the following file:
- xtd.drawing/include/xtd/drawing/size_f.h