/**
 * Copyright(c) Live2D Inc. All rights reserved.
 *
 * Use of this source code is governed by the Live2D Open Software license
 * that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
 */ /**
 * 矩形形状（座標・長さはfloat値）を定義するクラス
 */ export class csmRect { param x param y param w param h public constructor ( x ? , y ? , w ? , h ? ) { this . x = x ; this . y = y ; this . width = w ; this . height = h ; } /**
     * 矩形中央のX座標を取得する
     */ public getCenterX ( ) { return this . x + 0.5 * this . width ; } /**
     * 矩形中央のY座標を取得する
     */ public getCenterY ( ) { return this . y + 0.5 * this . height ; } /**
     * 右側のX座標を取得する
     */ public getRight ( ) { return this . x + this . width ; } /**
     * 下端のY座標を取得する
     */ public getBottom ( ) { return this . y + this . height ; } param r public setRect ( r ) { this . x = r . x ; this . y = r . y ; this . width = r . width ; this . height = r . height ; } param w param h public expand ( w , h ) { this . x -= w ; this . y -= h ; this . width += w * 2.0 ; this . height += h * 2.0 ; } public x : number ; public y : number ; public width : number ; public height : number ; } import * as $ from './csmrectf' ; export namespace Live2DCubismFramework { export const csmRect = $ . csmRect ; export type csmRect = $ . csmRect ; }