Blame toonz/sources/include/tpaletteutil.h
|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef TPALETTE_UTIL_H
|
|
Toshihiro Shimizu |
890ddd |
#define TPALETTE_UTIL_H
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "tpalette.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include <set></set>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#undef DVAPI
|
|
Toshihiro Shimizu |
890ddd |
#undef DVVAR
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifdef TVRENDER_EXPORTS
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_EXPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_EXPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#else
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_IMPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_IMPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//
|
|
Toshihiro Shimizu |
890ddd |
// mergePalette
|
|
Toshihiro Shimizu |
890ddd |
// input: sourcePalette, sourceIndices
|
|
Toshihiro Shimizu |
890ddd |
// output: indexTable, modifies: targetPalette
|
|
Toshihiro Shimizu |
890ddd |
//
|
|
Shinya Kitaoka |
120a6e |
// inserisce i colori di sourcePalette individuati da sourceIndices in
|
|
Shinya Kitaoka |
120a6e |
// targetPalette
|
|
Shinya Kitaoka |
120a6e |
// per ogni colore prima cerca un colore identico (TColorStyle::operator==()) in
|
|
Shinya Kitaoka |
120a6e |
// targetPalette
|
|
Toshihiro Shimizu |
890ddd |
// se non c'e' ne crea uno nuovo (nella prima pagina di targetPalette)
|
|
Shinya Kitaoka |
120a6e |
// indexTable assicura la conversione <indici in="" sourcepalette=""> -> </indici>
|
|
Shinya Kitaoka |
120a6e |
// targetPalette>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
DVAPI void mergePalette(const TPaletteP &targetPalette,
|
|
Shinya Kitaoka |
120a6e |
std::map<int, int=""> &indexTable,</int,>
|
|
Shinya Kitaoka |
120a6e |
const TPaletteP &sourcePalette,
|
|
Shinya Kitaoka |
120a6e |
const std::set<int> &sourceIndices);</int>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
// replace palette and lacking amount of styles will be copied from the other
|
|
Shinya Kitaoka |
120a6e |
// one
|
|
Toshihiro Shimizu |
890ddd |
// return value will be true if the style amount is changed after the operation
|
|
Shinya Kitaoka |
120a6e |
DVAPI bool mergePalette_Overlap(const TPaletteP &dstPalette,
|
|
Shinya Kitaoka |
120a6e |
const TPaletteP &copiedPalette,
|
|
Shinya Kitaoka |
120a6e |
bool keepOriginalPalette);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif
|