summaryrefslogtreecommitdiffstats
path: root/tksao/frame/fitsmask.C
blob: 95b7ce927fabb8eaef15c22e5687af014365f86b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (C) 1999-2018
// Smithsonian Astrophysical Observatory, Cambridge, MA, USA
// For conditions of distribution and use, see copyright notice in "copyright"

#include <tk.h>

#include "fitsmask.h"
#include "base.h"
#include "context.h"

FitsMask::FitsMask(Base* pp, char* clr, MaskType mm, double ll, double hh)
  : mark_(mm), low_(ll), high_(hh)
{
  context_ = new Context();
  context_->parent(pp);

  colorName_ = dupstr(clr);

  next_ = NULL;
  previous_ = NULL;
}

FitsMask::~FitsMask()
{
  if (colorName_)
    delete [] colorName_;

  if (context_) {
    context_->unload();
    delete context_;
  }
}