OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::TextureRegion Struct Reference

#include <TextureRegion.hpp>

Public Member Functions

SIV3D_NODISCARD_CXX20 TextureRegion ()=default
 
SIV3D_NODISCARD_CXX20 TextureRegion (const Texture &_texture)
 
SIV3D_NODISCARD_CXX20 TextureRegion (const Texture &_texture, float l, float t, float r, float b, double sx, double sy)
 
SIV3D_NODISCARD_CXX20 TextureRegion (const Texture &_texture, float l, float t, float r, float b, const Vec2 &_size)
 
SIV3D_NODISCARD_CXX20 TextureRegion (const Texture &_texture, const FloatRect &_uvRect, double sx, double sy)
 
SIV3D_NODISCARD_CXX20 TextureRegion (const Texture &_texture, const FloatRect &_uvRect, const Vec2 &_size)
 
RectF region (double x, double y) const noexcept
 
RectF region (Vec2 pos=Vec2{ 0, 0 }) const noexcept
 
RectF regionAt (double x, double y) const noexcept
 
RectF regionAt (Vec2 pos) const noexcept
 
TextureRegion stretched (double x, double y) const
 
TextureRegion stretched (Vec2 _size) const
 
RectF draw (const ColorF &diffuse=Palette::White) const
 
RectF draw (const ColorF &color0, const ColorF &color1, const ColorF &color2, const ColorF &color3) const
 
RectF draw (Arg::top_< ColorF > topColor, Arg::bottom_< ColorF > bottomColor) const
 
RectF draw (Arg::left_< ColorF > leftColor, Arg::right_< ColorF > rightColor) const
 
RectF draw (double x, double y, const ColorF &diffuse=Palette::White) const
 
RectF draw (double x, double y, const ColorF &color0, const ColorF &color1, const ColorF &color2, const ColorF &color3) const
 
RectF draw (double x, double y, Arg::top_< ColorF > topColor, Arg::bottom_< ColorF > bottomColor) const
 
RectF draw (double x, double y, Arg::left_< ColorF > leftColor, Arg::right_< ColorF > rightColor) const
 
RectF draw (const Vec2 &pos, const ColorF &diffuse=Palette::White) const
 
RectF draw (const Vec2 &pos, const ColorF &color0, const ColorF &color1, const ColorF &color2, const ColorF &color3) const
 
RectF draw (const Vec2 &pos, Arg::top_< ColorF > topColor, Arg::bottom_< ColorF > bottomColor) const
 
RectF draw (const Vec2 &pos, Arg::left_< ColorF > leftColor, Arg::right_< ColorF > rightColor) const
 
RectF draw (Arg::topLeft_< Vec2 > topLeft, const ColorF &diffuse=Palette::White) const
 
RectF draw (Arg::topRight_< Vec2 > topRight, const ColorF &diffuse=Palette::White) const
 
RectF draw (Arg::bottomLeft_< Vec2 > bottomLeft, const ColorF &diffuse=Palette::White) const
 
RectF draw (Arg::bottomRight_< Vec2 > bottomRight, const ColorF &diffuse=Palette::White) const
 
RectF draw (Arg::topCenter_< Vec2 > topCenter, const ColorF &diffuse=Palette::White) const
 
RectF draw (Arg::bottomCenter_< Vec2 > bottomCenter, const ColorF &diffuse=Palette::White) const
 
RectF draw (Arg::leftCenter_< Vec2 > leftCenter, const ColorF &diffuse=Palette::White) const
 
RectF draw (Arg::rightCenter_< Vec2 >rightCenter, const ColorF &diffuse=Palette::White) const
 
RectF draw (Arg::center_< Vec2 > center, const ColorF &diffuse=Palette::White) const
 
RectF drawAt (double x, double y, const ColorF &diffuse=Palette::White) const
 
RectF drawAt (double x, double y, const ColorF &color0, const ColorF &color1, const ColorF &color2, const ColorF &color3) const
 
RectF drawAt (const Vec2 &pos, const ColorF &diffuse=Palette::White) const
 中心位置を指定してテクスチャの一部分を描画します。 More...
 
RectF drawAt (const Vec2 &pos, const ColorF &color0, const ColorF &color1, const ColorF &color2, const ColorF &color3) const
 
RectF drawClipped (double x, double y, const RectF &clipRect, const ColorF &diffuse=Palette::White) const
 
RectF drawClipped (const Vec2 &pos, const RectF &clipRect, const ColorF &diffuse=Palette::White) const
 
RectF drawAtClipped (double x, double y, const RectF &clipRect, const ColorF &diffuse=Palette::White) const
 
RectF drawAtClipped (const Vec2 &pos, const RectF &clipRect, const ColorF &diffuse=Palette::White) const
 
TextureRegion mirrored () const
 
TextureRegion mirrored (bool doMirror) const
 
TextureRegion flipped () const
 
TextureRegion flipped (bool doFlip) const
 
TextureRegion scaled (double s) const
 
TextureRegion scaled (double sx, double sy) const
 
TextureRegion scaled (Vec2 s) const
 
TextureRegion resized (double _size) const
 
TextureRegion resized (double width, double height) const
 
TextureRegion resized (Vec2 _size) const
 
TextureRegion fitted (double width, double height, AllowScaleUp allowScaleUp=AllowScaleUp::Yes) const
 
TextureRegion fitted (const Vec2 &_size, AllowScaleUp allowScaleUp=AllowScaleUp::Yes) const
 
TexturedQuad rotated (double angle) const
 
TexturedQuad rotatedAt (double x, double y, double angle) const
 
TexturedQuad rotatedAt (const Vec2 &pos, double angle) const
 
TexturedRoundRect rounded (double r) const
 

Public Attributes

Texture texture
 
FloatRect uvRect = FloatRect{ 0.0f, 0.0f, 0.0f, 0.0f }
 
Float2 size = Float2{ 0.0f, 0.0f }
 

Constructor & Destructor Documentation

◆ TextureRegion() [1/6]

SIV3D_NODISCARD_CXX20 s3d::TextureRegion::TextureRegion ( )
default

◆ TextureRegion() [2/6]

SIV3D_NODISCARD_CXX20 s3d::TextureRegion::TextureRegion ( const Texture _texture)

◆ TextureRegion() [3/6]

SIV3D_NODISCARD_CXX20 s3d::TextureRegion::TextureRegion ( const Texture _texture,
float  l,
float  t,
float  r,
float  b,
double  sx,
double  sy 
)

◆ TextureRegion() [4/6]

SIV3D_NODISCARD_CXX20 s3d::TextureRegion::TextureRegion ( const Texture _texture,
float  l,
float  t,
float  r,
float  b,
const Vec2 _size 
)

◆ TextureRegion() [5/6]

SIV3D_NODISCARD_CXX20 s3d::TextureRegion::TextureRegion ( const Texture _texture,
const FloatRect _uvRect,
double  sx,
double  sy 
)

◆ TextureRegion() [6/6]

SIV3D_NODISCARD_CXX20 s3d::TextureRegion::TextureRegion ( const Texture _texture,
const FloatRect _uvRect,
const Vec2 _size 
)

Member Function Documentation

◆ draw() [1/21]

RectF s3d::TextureRegion::draw ( Arg::bottomCenter_< Vec2 bottomCenter,
const ColorF diffuse = Palette::White 
) const

◆ draw() [2/21]

RectF s3d::TextureRegion::draw ( Arg::bottomLeft_< Vec2 bottomLeft,
const ColorF diffuse = Palette::White 
) const

◆ draw() [3/21]

RectF s3d::TextureRegion::draw ( Arg::bottomRight_< Vec2 bottomRight,
const ColorF diffuse = Palette::White 
) const

◆ draw() [4/21]

RectF s3d::TextureRegion::draw ( Arg::center_< Vec2 center,
const ColorF diffuse = Palette::White 
) const

◆ draw() [5/21]

RectF s3d::TextureRegion::draw ( Arg::left_< ColorF leftColor,
Arg::right_< ColorF rightColor 
) const

◆ draw() [6/21]

RectF s3d::TextureRegion::draw ( Arg::leftCenter_< Vec2 leftCenter,
const ColorF diffuse = Palette::White 
) const

◆ draw() [7/21]

RectF s3d::TextureRegion::draw ( Arg::rightCenter_< Vec2 rightCenter,
const ColorF diffuse = Palette::White 
) const

◆ draw() [8/21]

RectF s3d::TextureRegion::draw ( Arg::top_< ColorF topColor,
Arg::bottom_< ColorF bottomColor 
) const

◆ draw() [9/21]

RectF s3d::TextureRegion::draw ( Arg::topCenter_< Vec2 topCenter,
const ColorF diffuse = Palette::White 
) const

◆ draw() [10/21]

RectF s3d::TextureRegion::draw ( Arg::topLeft_< Vec2 topLeft,
const ColorF diffuse = Palette::White 
) const

◆ draw() [11/21]

RectF s3d::TextureRegion::draw ( Arg::topRight_< Vec2 topRight,
const ColorF diffuse = Palette::White 
) const

◆ draw() [12/21]

RectF s3d::TextureRegion::draw ( const ColorF color0,
const ColorF color1,
const ColorF color2,
const ColorF color3 
) const

◆ draw() [13/21]

RectF s3d::TextureRegion::draw ( const ColorF diffuse = Palette::White) const

◆ draw() [14/21]

RectF s3d::TextureRegion::draw ( const Vec2 pos,
Arg::left_< ColorF leftColor,
Arg::right_< ColorF rightColor 
) const

◆ draw() [15/21]

RectF s3d::TextureRegion::draw ( const Vec2 pos,
Arg::top_< ColorF topColor,
Arg::bottom_< ColorF bottomColor 
) const

◆ draw() [16/21]

RectF s3d::TextureRegion::draw ( const Vec2 pos,
const ColorF color0,
const ColorF color1,
const ColorF color2,
const ColorF color3 
) const

◆ draw() [17/21]

RectF s3d::TextureRegion::draw ( const Vec2 pos,
const ColorF diffuse = Palette::White 
) const

◆ draw() [18/21]

RectF s3d::TextureRegion::draw ( double  x,
double  y,
Arg::left_< ColorF leftColor,
Arg::right_< ColorF rightColor 
) const

◆ draw() [19/21]

RectF s3d::TextureRegion::draw ( double  x,
double  y,
Arg::top_< ColorF topColor,
Arg::bottom_< ColorF bottomColor 
) const

◆ draw() [20/21]

RectF s3d::TextureRegion::draw ( double  x,
double  y,
const ColorF color0,
const ColorF color1,
const ColorF color2,
const ColorF color3 
) const

◆ draw() [21/21]

RectF s3d::TextureRegion::draw ( double  x,
double  y,
const ColorF diffuse = Palette::White 
) const

◆ drawAt() [1/4]

RectF s3d::TextureRegion::drawAt ( const Vec2 pos,
const ColorF color0,
const ColorF color1,
const ColorF color2,
const ColorF color3 
) const

◆ drawAt() [2/4]

RectF s3d::TextureRegion::drawAt ( const Vec2 pos,
const ColorF diffuse = Palette::White 
) const

中心位置を指定してテクスチャの一部分を描画します。

Parameters
pos描画する中心の座標
diffuse描画時に乗算する色
Returns
テクスチャが描画された領域

◆ drawAt() [3/4]

RectF s3d::TextureRegion::drawAt ( double  x,
double  y,
const ColorF color0,
const ColorF color1,
const ColorF color2,
const ColorF color3 
) const

◆ drawAt() [4/4]

RectF s3d::TextureRegion::drawAt ( double  x,
double  y,
const ColorF diffuse = Palette::White 
) const

◆ drawAtClipped() [1/2]

RectF s3d::TextureRegion::drawAtClipped ( const Vec2 pos,
const RectF clipRect,
const ColorF diffuse = Palette::White 
) const

◆ drawAtClipped() [2/2]

RectF s3d::TextureRegion::drawAtClipped ( double  x,
double  y,
const RectF clipRect,
const ColorF diffuse = Palette::White 
) const

◆ drawClipped() [1/2]

RectF s3d::TextureRegion::drawClipped ( const Vec2 pos,
const RectF clipRect,
const ColorF diffuse = Palette::White 
) const

◆ drawClipped() [2/2]

RectF s3d::TextureRegion::drawClipped ( double  x,
double  y,
const RectF clipRect,
const ColorF diffuse = Palette::White 
) const

◆ fitted() [1/2]

TextureRegion s3d::TextureRegion::fitted ( const Vec2 _size,
AllowScaleUp  allowScaleUp = AllowScaleUp::Yes 
) const

◆ fitted() [2/2]

TextureRegion s3d::TextureRegion::fitted ( double  width,
double  height,
AllowScaleUp  allowScaleUp = AllowScaleUp::Yes 
) const

◆ flipped() [1/2]

TextureRegion s3d::TextureRegion::flipped ( ) const

◆ flipped() [2/2]

TextureRegion s3d::TextureRegion::flipped ( bool  doFlip) const

◆ mirrored() [1/2]

TextureRegion s3d::TextureRegion::mirrored ( ) const

◆ mirrored() [2/2]

TextureRegion s3d::TextureRegion::mirrored ( bool  doMirror) const

◆ region() [1/2]

RectF s3d::TextureRegion::region ( double  x,
double  y 
) const
noexcept

◆ region() [2/2]

RectF s3d::TextureRegion::region ( Vec2  pos = Vec2{ 0, 0 }) const
noexcept

◆ regionAt() [1/2]

RectF s3d::TextureRegion::regionAt ( double  x,
double  y 
) const
noexcept

◆ regionAt() [2/2]

RectF s3d::TextureRegion::regionAt ( Vec2  pos) const
noexcept

◆ resized() [1/3]

TextureRegion s3d::TextureRegion::resized ( double  _size) const

◆ resized() [2/3]

TextureRegion s3d::TextureRegion::resized ( double  width,
double  height 
) const

◆ resized() [3/3]

TextureRegion s3d::TextureRegion::resized ( Vec2  _size) const

◆ rotated()

TexturedQuad s3d::TextureRegion::rotated ( double  angle) const

◆ rotatedAt() [1/2]

TexturedQuad s3d::TextureRegion::rotatedAt ( const Vec2 pos,
double  angle 
) const

◆ rotatedAt() [2/2]

TexturedQuad s3d::TextureRegion::rotatedAt ( double  x,
double  y,
double  angle 
) const

◆ rounded()

TexturedRoundRect s3d::TextureRegion::rounded ( double  r) const

◆ scaled() [1/3]

TextureRegion s3d::TextureRegion::scaled ( double  s) const

◆ scaled() [2/3]

TextureRegion s3d::TextureRegion::scaled ( double  sx,
double  sy 
) const

◆ scaled() [3/3]

TextureRegion s3d::TextureRegion::scaled ( Vec2  s) const

◆ stretched() [1/2]

TextureRegion s3d::TextureRegion::stretched ( double  x,
double  y 
) const

◆ stretched() [2/2]

TextureRegion s3d::TextureRegion::stretched ( Vec2  _size) const

Member Data Documentation

◆ size

Float2 s3d::TextureRegion::size = Float2{ 0.0f, 0.0f }

◆ texture

Texture s3d::TextureRegion::texture

◆ uvRect

FloatRect s3d::TextureRegion::uvRect = FloatRect{ 0.0f, 0.0f, 0.0f, 0.0f }

The documentation for this struct was generated from the following file: