System.Types.TSize

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TSize = record

C++

struct TSize: public tagSIZE {
  TSize() _ALWAYS_INLINE {
    this->cx = this->cy = 0;
  }
  TSize(const tagSIZE& ts) _ALWAYS_INLINE {
    this->cx = ts.cx;
    this->cy = ts.cy;
  }
  TSize(int32_t x, int32_t y) _ALWAYS_INLINE {
    this->cx = x;
    this->cy = y;
  }
  bool operator ==(const TSize& ts) const _ALWAYS_INLINE {
    return this->cx == ts.cx && this->cy == ts.cy;
  }
  bool operator !=(const TSize& ts) const _ALWAYS_INLINE {
    return !(*this == ts);
  }
  TSize operator +(const TSize& rhs) const _ALWAYS_INLINE {
    return TSize(this->cx + rhs.cx, this->cy + rhs.cy);
  }
  TSize operator -(const TSize& rhs) const _ALWAYS_INLINE {
    return TSize(this->cx - rhs.cx, this->cy - rhs.cy);
  }
  TSize& operator+= (const TSize& rhs) _ALWAYS_INLINE {
      this->cx += rhs.cx;
      this->cy += rhs.cy;
      return *this;
  }
  TSize& operator-= (const TSize& rhs) _ALWAYS_INLINE {
    this->cx -= rhs.cx;
    this->cy -= rhs.cy;
    return *this;
  }
  bool IsZero() const _ALWAYS_INLINE {
    return !cx && !cy;
  }
  __property LONG Width =  { read=cx,   write=cx  };
  __property LONG Height = { read=cy,   write=cy  };
};

Properties

Type Visibility Source Unit Parent
record
struct
public
System.Types.pas
SystemTypes.h
System.Types System.Types

Description

Specifies the width and height of an object.

TSize specifies the size of an object. The object can be a rectangle, a form, a button, and so on. Typically, the implied units of measurement are pixels.

cx is the width.

cy is the height.

See Also