// Copyright (C) 1999-2017 // Smithsonian Astrophysical Observatory, Cambridge, MA, USA // For conditions of distribution and use, see copyright notice in "copyright" #include "colorscalergb.h" ColorScaleRGB::ColorScaleRGB(int s) { size_ = s; psColors_ = new unsigned char[s]; memset(psColors_, '0', size_); } ColorScaleRGB::~ColorScaleRGB() { if (psColors_) delete [] psColors_; } LinearScaleRGB::LinearScaleRGB(int jj, int ss, unsigned char* colorCells, int count) : ColorScaleRGB(ss) { for (int ii=0; ii=count) ll = count-1; memcpy(psColors_+ii, colorCells+ll*3+jj,1); } } PowScaleRGB::PowScaleRGB(int jj, int ss, unsigned char* colorCells, int count, double exp) : ColorScaleRGB(ss) { for (int ii=0; ii=count) ll = count-1; memcpy(psColors_+ii, colorCells+ll*3+jj,1); } } SqrtScaleRGB::SqrtScaleRGB(int jj, int ss, unsigned char* colorCells, int count) : ColorScaleRGB(ss) { for(int ii=0; ii