| 9 | struct Plot::MyGdFont : public gdFont {}; |
| 10 | |
| 11 | Plot::Plot(int width, int height, int totalSeconds, int samplingPeriod) |
| 12 | : width_(width), |
| 13 | height_(height), |
| 14 | totalSeconds_(totalSeconds), |
| 15 | samplingPeriod_(samplingPeriod), |
| 16 | image_(gdImageCreate(width_, height_)), |
| 17 | font_(static_cast<MyGdFont*>(gdFontGetSmall())), |
| 18 | fontWidth_(font_->w), |
| 19 | fontHeight_(font_->h), |
| 20 | background_(gdImageColorAllocate(image_, 255, 255, 240)), |
| 21 | black_(gdImageColorAllocate(image_, 0, 0, 0)), |
| 22 | gray_(gdImageColorAllocate(image_, 200, 200, 200)), |
| 23 | blue_(gdImageColorAllocate(image_, 128, 128, 255)), |
| 24 | kRightMargin_(3 * fontWidth_ + 5), |
| 25 | ratioX_(static_cast<double>(samplingPeriod_ * (width_ - kLeftMargin_ - kRightMargin_)) / totalSeconds_) |
| 26 | { |
| 27 | // gdImageSetAntiAliased(image_, black_); |
| 28 | } |
| 29 | |
| 30 | Plot::~Plot() |
| 31 | { |
nothing calls this directly
no outgoing calls
no test coverage detected