Shinya Kitaoka 810553
#pragma once
Shinya Kitaoka 810553
Toshihiro Shimizu 890ddd
#if !defined(TOONZ_PLUGIN_UTILITIES_HPP__)
Toshihiro Shimizu 890ddd
#define TOONZ_PLUGIN_UTILITIES_HPP__
Toshihiro Shimizu 890ddd
#include "toonz_hostif.h"
Toshihiro Shimizu 890ddd
#include <tgeometry.h></tgeometry.h>
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
namespace plugin {
Shinya Kitaoka 120a6e
namespace utils {
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
inline bool copy_rect(toonz_rect_t *dst, const TRectD &src) {
Shinya Kitaoka 120a6e
  dst->x0 = src.x0;
Shinya Kitaoka 120a6e
  dst->y0 = src.y0;
Shinya Kitaoka 120a6e
  dst->x1 = src.x1;
Shinya Kitaoka 120a6e
  dst->y1 = src.y1;
Shinya Kitaoka 120a6e
  return true;
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
inline TRectD restore_rect(const toonz_rect_t *src) {
Shinya Kitaoka 120a6e
  return TRectD(src->x0, src->y0, src->x1, src->y1);
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
inline bool copy_affine(toonz_affine_t *dst, const TAffine &src) {
Shinya Kitaoka 120a6e
  dst->a11 = src.a11;
Shinya Kitaoka 120a6e
  dst->a12 = src.a12;
Shinya Kitaoka 120a6e
  dst->a13 = src.a13;
Shinya Kitaoka 120a6e
  dst->a21 = src.a21;
Shinya Kitaoka 120a6e
  dst->a22 = src.a22;
Shinya Kitaoka 120a6e
  dst->a23 = src.a23;
Shinya Kitaoka 120a6e
  return true;
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
inline TAffine restore_affine(const toonz_affine_t *src) {
Shinya Kitaoka 120a6e
  return TAffine(src->a11, src->a12, src->a13, src->a21, src->a22, src->a23);
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
#endif