载入中...
搜索中...
未找到
eve::editor::Brush类 参考

Unity GridBrushBase-inspired tile brush. Operates on TileBuffer; exposes preview + change list for UI / undo. 更多...

#include <Brush.h>

Public 成员函数

 Brush ()
 
void setTool (const std::string &tool)
 
std::string getTool () const
 
void setSize (int size)
 
int getSize () const
 
void setShape (const std::string &shape)
 
std::string getShape () const
 
void setTile (int gid)
 
int getTile () const
 
void setEraseTile (int gid)
 
int getEraseTile () const
 
void setStampSize (int width, int height)
 
int getStampWidth () const
 
int getStampHeight () const
 
void setStampTile (int lx, int ly, int gid)
 
int getStampTile (int lx, int ly) const
 
void clearStamp ()
 
int paintAt (TileBuffer *buffer, int tx, int ty)
 Apply current tool at / between cells. Returns cells changed.
 
int eraseAt (TileBuffer *buffer, int tx, int ty)
 
int floodFill (TileBuffer *buffer, int tx, int ty)
 
int paintLine (TileBuffer *buffer, int x0, int y0, int x1, int y1)
 
int paintRect (TileBuffer *buffer, int x0, int y0, int x1, int y1, bool filled)
 
int previewAt (TileBuffer *buffer, int tx, int ty)
 Fill preview buffer without mutating target.
 
int previewLine (TileBuffer *buffer, int x0, int y0, int x1, int y1)
 
int previewRect (TileBuffer *buffer, int x0, int y0, int x1, int y1, bool filled)
 
int getPreviewCount () const
 
int getPreviewX (int index) const
 
int getPreviewY (int index) const
 
int getPreviewGid (int index) const
 
int getChangeCount () const
 
int getChangeX (int index) const
 
int getChangeY (int index) const
 
int getChangeOldGid (int index) const
 
int getChangeNewGid (int index) const
 

详细描述

Unity GridBrushBase-inspired tile brush. Operates on TileBuffer; exposes preview + change list for UI / undo.

在文件 Brush.h14 行定义.

构造及析构函数说明

◆ Brush()

eve::editor::Brush::Brush ( )
default

成员函数说明

◆ clearStamp()

void eve::editor::Brush::clearStamp ( )

在文件 Brush.cpp59 行定义.

◆ eraseAt()

int eve::editor::Brush::eraseAt ( TileBuffer buffer,
int  tx,
int  ty 
)

在文件 Brush.cpp201 行定义.

被这些函数引用 paintAt().

◆ floodFill()

int eve::editor::Brush::floodFill ( TileBuffer buffer,
int  tx,
int  ty 
)

◆ getChangeCount()

int eve::editor::Brush::getChangeCount ( ) const
inline

在文件 Brush.h57 行定义.

◆ getChangeNewGid()

int eve::editor::Brush::getChangeNewGid ( int  index) const

在文件 Brush.cpp328 行定义.

◆ getChangeOldGid()

int eve::editor::Brush::getChangeOldGid ( int  index) const

在文件 Brush.cpp324 行定义.

◆ getChangeX()

int eve::editor::Brush::getChangeX ( int  index) const

在文件 Brush.cpp316 行定义.

◆ getChangeY()

int eve::editor::Brush::getChangeY ( int  index) const

在文件 Brush.cpp320 行定义.

◆ getEraseTile()

int eve::editor::Brush::getEraseTile ( ) const
inline

在文件 Brush.h31 行定义.

◆ getPreviewCount()

int eve::editor::Brush::getPreviewCount ( ) const
inline

在文件 Brush.h52 行定义.

◆ getPreviewGid()

int eve::editor::Brush::getPreviewGid ( int  index) const

在文件 Brush.cpp312 行定义.

◆ getPreviewX()

int eve::editor::Brush::getPreviewX ( int  index) const

在文件 Brush.cpp304 行定义.

◆ getPreviewY()

int eve::editor::Brush::getPreviewY ( int  index) const

在文件 Brush.cpp308 行定义.

◆ getShape()

std::string eve::editor::Brush::getShape ( ) const
inline

在文件 Brush.h25 行定义.

◆ getSize()

int eve::editor::Brush::getSize ( ) const
inline

在文件 Brush.h22 行定义.

◆ getStampHeight()

int eve::editor::Brush::getStampHeight ( ) const
inline

在文件 Brush.h35 行定义.

◆ getStampTile()

int eve::editor::Brush::getStampTile ( int  lx,
int  ly 
) const

在文件 Brush.cpp52 行定义.

◆ getStampWidth()

int eve::editor::Brush::getStampWidth ( ) const
inline

在文件 Brush.h34 行定义.

◆ getTile()

int eve::editor::Brush::getTile ( ) const
inline

在文件 Brush.h28 行定义.

◆ getTool()

std::string eve::editor::Brush::getTool ( ) const
inline

在文件 Brush.h19 行定义.

◆ paintAt()

int eve::editor::Brush::paintAt ( TileBuffer buffer,
int  tx,
int  ty 
)

Apply current tool at / between cells. Returns cells changed.

在文件 Brush.cpp192 行定义.

引用了 eraseAt() , 以及 floodFill().

◆ paintLine()

int eve::editor::Brush::paintLine ( TileBuffer buffer,
int  x0,
int  y0,
int  x1,
int  y1 
)

在文件 Brush.cpp243 行定义.

◆ paintRect()

int eve::editor::Brush::paintRect ( TileBuffer buffer,
int  x0,
int  y0,
int  x1,
int  y1,
bool  filled 
)

在文件 Brush.cpp250 行定义.

◆ previewAt()

int eve::editor::Brush::previewAt ( TileBuffer buffer,
int  tx,
int  ty 
)

Fill preview buffer without mutating target.

在文件 Brush.cpp257 行定义.

引用了 eve::editor::TileBuffer::getGid(), eve::editor::TileBuffer::inBounds(), p, x , 以及 y.

◆ previewLine()

int eve::editor::Brush::previewLine ( TileBuffer buffer,
int  x0,
int  y0,
int  x1,
int  y1 
)

在文件 Brush.cpp283 行定义.

◆ previewRect()

int eve::editor::Brush::previewRect ( TileBuffer buffer,
int  x0,
int  y0,
int  x1,
int  y1,
bool  filled 
)

在文件 Brush.cpp290 行定义.

◆ setEraseTile()

void eve::editor::Brush::setEraseTile ( int  gid)

在文件 Brush.cpp36 行定义.

◆ setShape()

void eve::editor::Brush::setShape ( const std::string &  shape)

在文件 Brush.cpp27 行定义.

◆ setSize()

void eve::editor::Brush::setSize ( int  size)

在文件 Brush.cpp22 行定义.

◆ setStampSize()

void eve::editor::Brush::setStampSize ( int  width,
int  height 
)

在文件 Brush.cpp38 行定义.

引用了 height , 以及 width.

◆ setStampTile()

void eve::editor::Brush::setStampTile ( int  lx,
int  ly,
int  gid 
)

在文件 Brush.cpp45 行定义.

◆ setTile()

void eve::editor::Brush::setTile ( int  gid)

在文件 Brush.cpp34 行定义.

◆ setTool()

void eve::editor::Brush::setTool ( const std::string &  tool)

在文件 Brush.cpp14 行定义.


该类的文档由以下文件生成: