mirror of
https://github.com/aseprite/aseprite.git
synced 2024-10-06 06:50:07 +00:00
Minor changes in style/formatting
This commit is contained in:
parent
41707c103d
commit
e4117d05c5
@ -1,16 +1,17 @@
|
|||||||
<!-- Aseprite -->
|
<!-- Aseprite -->
|
||||||
|
<!-- Copyright (C) 2019 by Igara Studio S.A. -->
|
||||||
<!-- Copyright (C) 2001-2016 by David Capello -->
|
<!-- Copyright (C) 2001-2016 by David Capello -->
|
||||||
<gui>
|
<gui>
|
||||||
<box vertical="true" expansive="true" id="controls">
|
<vbox expansive="true" id="controls">
|
||||||
<box horizontal="true" expansive="true">
|
<hbox expansive="true">
|
||||||
<grid columns="2" id="controls">
|
<grid columns="2" id="controls">
|
||||||
<label text="@replace_color.from" />
|
<label text="@replace_color.from" />
|
||||||
<colorpicker id="from" cell_align="horizontal" />
|
<colorpicker id="from" cell_align="horizontal" />
|
||||||
<label text="@replace_color.to" />
|
<label text="@replace_color.to" />
|
||||||
<colorpicker id="to" cell_align="horizontal" />
|
<colorpicker id="to" cell_align="horizontal" />
|
||||||
</grid>
|
</grid>
|
||||||
</box>
|
</hbox>
|
||||||
<label text="@replace_color.tolerance" />
|
<label text="@replace_color.tolerance" />
|
||||||
<slider min="0" max="255" id="tolerance" />
|
<slider min="0" max="255" id="tolerance" />
|
||||||
</box>
|
</vbox>
|
||||||
</gui>
|
</gui>
|
||||||
|
@ -66,19 +66,16 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void onReloadStock(Event& ev)
|
void onReloadStock(Event& ev) {
|
||||||
{
|
|
||||||
m_stock.reloadStock();
|
m_stock.reloadStock();
|
||||||
fillStockListBox();
|
fillStockListBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setupTiledMode(TiledMode tiledMode)
|
void setupTiledMode(TiledMode tiledMode) override {
|
||||||
{
|
|
||||||
m_filter.setTiledMode(tiledMode);
|
m_filter.setTiledMode(tiledMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fillStockListBox()
|
void fillStockListBox() {
|
||||||
{
|
|
||||||
const char* oldSelected = (m_filter.getMatrix() ? m_filter.getMatrix()->getName(): NULL);
|
const char* oldSelected = (m_filter.getMatrix() ? m_filter.getMatrix()->getName(): NULL);
|
||||||
|
|
||||||
// Clean the list
|
// Clean the list
|
||||||
|
@ -72,8 +72,7 @@ private:
|
|||||||
restartPreview();
|
restartPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setupTiledMode(TiledMode tiledMode)
|
void setupTiledMode(TiledMode tiledMode) override {
|
||||||
{
|
|
||||||
m_filter.setTiledMode(tiledMode);
|
m_filter.setTiledMode(tiledMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,6 @@ namespace {
|
|||||||
div = matrix->getDiv();
|
div = matrix->getDiv();
|
||||||
matrixData = &matrix->value(0, 0);
|
matrixData = &matrix->value(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GetPixelsDelegateRgba : public GetPixelsDelegate {
|
struct GetPixelsDelegateRgba : public GetPixelsDelegate {
|
||||||
@ -45,8 +44,7 @@ namespace {
|
|||||||
r = g = b = a = 0;
|
r = g = b = a = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void operator()(RgbTraits::pixel_t color)
|
void operator()(RgbTraits::pixel_t color) {
|
||||||
{
|
|
||||||
if (*matrixData) {
|
if (*matrixData) {
|
||||||
if (rgba_geta(color) == 0)
|
if (rgba_geta(color) == 0)
|
||||||
div -= *matrixData;
|
div -= *matrixData;
|
||||||
@ -59,7 +57,6 @@ namespace {
|
|||||||
}
|
}
|
||||||
matrixData++;
|
matrixData++;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GetPixelsDelegateGrayscale : public GetPixelsDelegate {
|
struct GetPixelsDelegateGrayscale : public GetPixelsDelegate {
|
||||||
@ -70,8 +67,7 @@ namespace {
|
|||||||
v = a = 0;
|
v = a = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void operator()(GrayscaleTraits::pixel_t color)
|
void operator()(GrayscaleTraits::pixel_t color) {
|
||||||
{
|
|
||||||
if (*matrixData) {
|
if (*matrixData) {
|
||||||
if (graya_geta(color) == 0)
|
if (graya_geta(color) == 0)
|
||||||
div -= *matrixData;
|
div -= *matrixData;
|
||||||
@ -82,7 +78,6 @@ namespace {
|
|||||||
}
|
}
|
||||||
matrixData++;
|
matrixData++;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GetPixelsDelegateIndexed : public GetPixelsDelegate {
|
struct GetPixelsDelegateIndexed : public GetPixelsDelegate {
|
||||||
@ -96,8 +91,7 @@ namespace {
|
|||||||
r = g = b = a = index = 0;
|
r = g = b = a = index = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void operator()(IndexedTraits::pixel_t color)
|
void operator()(IndexedTraits::pixel_t color) {
|
||||||
{
|
|
||||||
if (*matrixData) {
|
if (*matrixData) {
|
||||||
index += color * (*matrixData);
|
index += color * (*matrixData);
|
||||||
color_t rgba = pal->getEntry(color);
|
color_t rgba = pal->getEntry(color);
|
||||||
@ -112,7 +106,6 @@ namespace {
|
|||||||
}
|
}
|
||||||
matrixData++;
|
matrixData++;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user