SeExpr
ExprColorCurve.cpp
Go to the documentation of this file.
1 /*
2 * Copyright Disney Enterprises, Inc. All rights reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License
6 * and the following modification to it: Section 6 Trademarks.
7 * deleted and replaced with:
8 *
9 * 6. Trademarks. This License does not grant permission to use the
10 * trade names, trademarks, service marks, or product names of the
11 * Licensor and its affiliates, except as required for reproducing
12 * the content of the NOTICE file.
13 *
14 * You may obtain a copy of the License at
15 * http://www.apache.org/licenses/LICENSE-2.0
16 *
17 * @file ExprColorCurveUI.cpp
18 * @brief Contains PyQt4 Ramp Widget to emulate Maya's ramp widget
19 * @author Arthur Shek
20 * @version ashek 05/04/09 Initial Version
21 */
22 #include <iostream>
23 #include <algorithm>
24 
25 #include <QtGui/QColorDialog>
26 #include <QtGui/QDoubleValidator>
27 #include <QtGui/QGraphicsSceneMouseEvent>
28 #include <QtGui/QHBoxLayout>
29 #include <QtGui/QLabel>
30 #include <QtGui/QVBoxLayout>
31 #include <QtGui/QResizeEvent>
32 #include <QtGui/QPushButton>
33 #include <QtGui/QDialogButtonBox>
34 #include <QtGui/QMenu>
35 
36 #include <SeExpr2/ExprBuiltins.h>
37 #ifdef SEEXPR_USE_QDGUI
38 #include <qdgui/QdColorPickerDialog.h>
39 #endif
40 
41 #include "ExprColorCurve.h"
42 
43 CCurveScene::CCurveScene() : _curve(new T_CURVE),_width(320), _height(170), _color(SeExpr2::Vec3d(.5)), _interp(T_CURVE::kMonotoneSpline),
44  _selectedItem(-1), _pixmapDirty(true), _baseRectW(0), _baseRect(0), _lmb(false)
45 {
46  rebuildCurve();
48 }
49 
51 {
52  delete _curve;
53 }
54 
55 
56 void CCurveScene::resize(const int width, const int height)
57 {
58  // width and height already have the 8 px padding factored in
59  _width = width-16;
60  _height = height-16;
61  setSceneRect(-9, -2, width, height);
62  drawRect();
63  drawPoints();
64  _pixmap = QPixmap(_width, _height);
65  _pixmapDirty = true;
66 }
67 
69 {
70  delete _curve;
71  _curve=new T_CURVE;
72  for(unsigned int i=0;i<_cvs.size();i++)
73  _curve->addPoint(_cvs[i]._pos,_cvs[i]._val,_cvs[i]._interp);
75 }
76 
77 void CCurveScene::addPoint(double x, const SeExpr2::Vec3d y, const T_INTERP interp, const bool select)
78 {
79  x=SeExpr2::clamp(x,0,1);
80 
81  _cvs.push_back(T_CURVE::CV(x,y,T_INTERP(interp)));
82  int newIndex=_cvs.size()-1;
83 
84  rebuildCurve();
85 
86  if(select){
87  _selectedItem = newIndex;
88  emit cvSelected(x, y, interp);
89  }
90  _pixmapDirty = true;
91  _baseRectW->update();
92  drawPoints();
93 }
94 
96 {
97  _cvs.erase(_cvs.begin()+index);
98  _selectedItem = -1;
99  rebuildCurve();
100 
101  _pixmapDirty = true;
102  _baseRectW->update();
103  drawPoints();
105 }
106 
108 {
109  _cvs.clear();
110 }
111 
112 
113 void CCurveScene::keyPressEvent(QKeyEvent *event)
114 {
115  if (((event->key() == Qt::Key_Backspace) ||
116  (event->key() == Qt::Key_Delete)) && (_selectedItem >= 0)) {
117  // user hit delete with cv selected
119  }
120 }
121 
122 void CCurveScene::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent)
123 {
124  _lmb = true;
125  QPointF pos = mouseEvent->scenePos();
126  // get items under mouse click
127  QList<QGraphicsItem *> itemList = items(pos);
128  if (itemList.empty()) {
129  _selectedItem = -1;
130  emit cvSelected(-1, SeExpr2::Vec3d(0.0), _interp);
131  drawPoints();
132  } else if (itemList[0]->zValue() == 2) {
133  // getting here means we've selected a current point
134  const int numCircle = _circleObjects.size();
135  for (int i = 0; i < numCircle; i++ ) {
136  QGraphicsItem *obj = _circleObjects[i];
137  if (obj == itemList[0]) {
138  _selectedItem = i;
139  _color = _cvs[i]._val;
140  _interp = _cvs[i]._interp;
141  emit cvSelected(_cvs[i]._pos, _cvs[i]._val, _cvs[i]._interp);
142  }
143  }
144  drawPoints();
145  } else {
146  if(mouseEvent->buttons() == Qt::LeftButton){
147  // getting here means we want to create a new point
148  double myx=pos.x()/_width;
149  T_INTERP interpFromNearby=_curve->getLowerBoundCV(SeExpr2::clamp(myx,0,1))._interp;
150  if(interpFromNearby==T_CURVE::kNone)
151  interpFromNearby=T_CURVE::kMonotoneSpline;
152  addPoint(myx, _curve->getValue(myx), interpFromNearby);
154  }else{
155  _selectedItem=-1;
156  drawPoints();
157  }
158  }
159 }
160 
161 void CCurveScene::mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent)
162 {
163  if (_lmb) {
164  QPointF point = mouseEvent->scenePos();
165  if (_selectedItem >= 0) {
166  // clamp motion to inside curve area
167  double pos = SeExpr2::clamp(point.x()/_width,0,1);
168  _cvs[_selectedItem]._pos=pos;
169  rebuildCurve();
170  _pixmapDirty = true;
171  _baseRectW->update();
173  drawPoints();
175  }
176  }
177 }
178 
179 void CCurveScene::contextMenuEvent(QGraphicsSceneContextMenuEvent* event){
180  if(_selectedItem>=0){
181  QMenu *menu = new QMenu(event->widget());
182  QAction *deleteAction = menu->addAction("Delete Point");
183  QAction *action = menu->exec(event->screenPos());
184  if (action == deleteAction) removePoint(_selectedItem);
185  }
186 }
187 
188 void CCurveScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent)
189 {
190  Q_UNUSED(mouseEvent);
191  _lmb = false;
192 }
193 
194 // user selected a different interpolation type, redraw
195 void CCurveScene::interpChanged(const int interp)
196 {
197  _interp = (T_INTERP) interp;
198  if (_selectedItem >= 0) {
199  _cvs[_selectedItem]._interp = _interp;
200  rebuildCurve();
201  _pixmapDirty = true;
202  _baseRectW->update();
204  }
205 }
206 
207 // user entered a different point position, redraw
209 {
210  if (_selectedItem >= 0) {
211  pos=SeExpr2::clamp(pos,0,1);
212  _cvs[_selectedItem]._pos = pos;
213  rebuildCurve();
214  _pixmapDirty = true;
215  _baseRectW->update();
216  drawPoints();
218  }
219 }
220 
221 // user entered a different point value, redraw
223 {
224  _color = val;
225  if (_selectedItem >= 0) {
226  _cvs[_selectedItem]._val = val;
227  rebuildCurve();
228  _pixmapDirty = true;
229  _baseRectW->update();
230  drawPoints();
232  }
233 }
234 
235 
236 // return points in reverse order in order to use same parsing in editor
238 {
239  emit curveChanged();
240 }
241 
243 {
244  if (_pixmapDirty) {
245  QByteArray buf;
246  buf.append(QString("P6\n%1 %2\n255\n").arg(_width).arg(_height));
247  buf.append(getCPixmap());
248  _pixmap.loadFromData(buf, "PPM");
249  _pixmapDirty = false;
250  }
251  return _pixmap;
252 }
253 
254 
256 {
257  // create pixmap, set to gray
258  const int len = 3 * _width * _height;
259  QByteArray pixmap(len, 127);
260 
261  double paramInc = 1.0 / (_width - 2);
262  double param = 0.5 * paramInc; // start at pixel center
263  // add black lines to left
264  char* ptr = pixmap.data();
265  *ptr++ = 0;
266  *ptr++ = 0;
267  *ptr++ = 0;
268  for (int i = 1; i < _width - 1; i++) {
269  SeExpr2::Vec3d color = _curve->getValue(param);
270  *ptr++ = char(std::min(std::max(0.0, 255 * color[0]), 255.0) + 0.5);
271  *ptr++ = char(std::min(std::max(0.0, 255 * color[1]), 255.0) + 0.5);
272  *ptr++ = char(std::min(std::max(0.0, 255 * color[2]), 255.0) + 0.5);
273  param += paramInc;
274  }
275  // add black lines to right
276  *ptr++ = 0;
277  *ptr++ = 0;
278  *ptr++ = 0;
279 
280  for (int i = 1; i < _height-1; i++) {
281  memcpy(pixmap.data()+(i * _width * 3), pixmap.data()+((i - 1) * _width * 3), _width * 3);
282  }
283 
284  // add black lines to top and bottom
285  memset(pixmap.data(), 0, _width * 3);
286  memset(pixmap.data()+((_height - 1) * _width * 3), 0, _width * 3);
287 
288  return pixmap;
289 }
290 
291 
292 // draws the base gray outline rectangle
294 {
295  if (_baseRectW == 0) {
296  _baseRectW = new ExprCBoxWidget(this);
297  }
298  if (_baseRect == 0) {
299  _baseRect = addWidget(_baseRectW);
300  }
301  _baseRect->widget()->setFixedSize(_width, _height);
302  _baseRect->widget()->update();
303  _baseRect->setZValue(0);
304 }
305 
306 
307 // draws the cv points
309 {
310  while (_circleObjects.size()) {
311  delete _circleObjects[0];
312  _circleObjects.erase(_circleObjects.begin());
313  }
314  const int numCV = _cvs.size();
315  for (int i = 0; i < numCV; i++) {
316  const T_CURVE::CV& pt = _cvs[i];
317  QPen pen;
318  if (i == _selectedItem) {
319  pen = QPen(QColor(255,170,0),1.0);
320  } else {
321  pen = QPen(Qt::black,1.0);
322  }
323  _circleObjects.push_back(addEllipse(pt._pos*_width-4, _height+3, 8, 8, pen, QBrush(QColor(int(255 * pt._val[0] +0.5), int(255 * pt._val[1] + 0.5), int(255 * pt._val[2] + 0.5)))));
324  QGraphicsEllipseItem *circle = _circleObjects.back();
325  circle->setFlag(QGraphicsItem::ItemIsMovable, true);
326  circle->setZValue(2);
327  }
328 }
329 
330 
331 void ExprCBoxWidget::paintEvent(QPaintEvent* event)
332 {
333  Q_UNUSED(event);
334  QPainter p(this);
335  p.drawPixmap(0, 0, _curveScene->getPixmap());
336 }
337 
338 void ExprCSwatchFrame::paintEvent(QPaintEvent* event)
339 {
340  Q_UNUSED(event);
341  QPainter p(this);
342  p.fillRect(contentsRect(),_color);
343 }
344 
345 
346 ExprCSwatchFrame::ExprCSwatchFrame(SeExpr2::Vec3d value, QWidget* parent) : QFrame(parent), _value(value)
347 {
348  _color = QColor(int(255 * _value[0] + 0.5), int(255 * _value[1] + 0.5), int(255 * _value[2] + 0.5));
349 }
350 
351 
353 {
354  _color = QColor(int(255 * value[0] + 0.5), int(255 * value[1] + 0.5), int(255 * value[2] + 0.5));
355  //setPalette(QPalette(_color));
356  _value = value;
357  repaint();
358 }
359 
361 {
362  return _value;
363 }
364 
365 
366 void ExprCSwatchFrame::mousePressEvent(QMouseEvent* event)
367 {
368  Q_UNUSED(event);
369 #ifdef SEEXPR_USE_QDGUI
370  QColor color = QdColorPickerDialog::chooseColorFromDialog(_color,this);
371 #else
372  QColor color = QColorDialog::getColor(_color);
373 #endif
374  if (color.isValid()) {
375  _value[0] = color.red() / 255.0;
376  _value[1] = color.green() / 255.0;
377  _value[2] = color.blue() / 255.0;
378  setPalette(QPalette(color));
379  _color = color;
381  emit swatchChanged(color);
382  }
383 }
384 
385 
386 ExprColorCurve::ExprColorCurve(QWidget* parent, QString pLabel, QString vLabel, QString iLabel,
387  bool expandable) :
388  QWidget(parent), _scene(0), _selPosEdit(0), _selValEdit(0), _interpComboBox(0)
389 {
390  Q_UNUSED(iLabel);
391  QHBoxLayout *mainLayout = new QHBoxLayout();
392  mainLayout->setSpacing(2);
393  mainLayout->setMargin(5);
394 
395  QWidget *edits = new QWidget;
396  QVBoxLayout *editsLayout = new QVBoxLayout;
397  editsLayout->setAlignment(Qt::AlignTop);
398  editsLayout->setSpacing(0);
399  editsLayout->setMargin(0);
400  edits->setLayout(editsLayout);
401 
402  QWidget *selPos = new QWidget;
403  QHBoxLayout *selPosLayout = new QHBoxLayout;
404  selPosLayout->setSpacing(1);
405  selPosLayout->setMargin(1);
406  selPos->setLayout(selPosLayout);
407  _selPosEdit = new QLineEdit;
408  QDoubleValidator *posValidator = new QDoubleValidator(0.0,1.0,6,_selPosEdit);
409  _selPosEdit->setValidator(posValidator);
410  _selPosEdit->setFixedWidth(38);
411  _selPosEdit->setFixedHeight(20);
412  selPosLayout->addStretch(50);
413  QLabel *posLabel;
414  if (pLabel.isEmpty()) {
415  posLabel = new QLabel("Selected Position: ");
416  } else {
417  posLabel = new QLabel(pLabel);
418  }
419  selPosLayout->addWidget(posLabel);
420  selPosLayout->addWidget(_selPosEdit);
421 
422  QWidget *selVal = new QWidget;
423  QBoxLayout *selValLayout = new QHBoxLayout;
424  selValLayout->setSpacing(1);
425  selValLayout->setMargin(1);
426  selVal->setLayout(selValLayout);
428  _selValEdit->setFixedWidth(38);
429  _selValEdit->setFixedHeight(20);
430  selValLayout->addStretch(50);
431  QLabel *valLabel;
432  if (vLabel.isEmpty()) {
433  valLabel = new QLabel("Selected Color: ");
434  } else {
435  valLabel = new QLabel(vLabel);
436  }
437  selValLayout->addWidget(valLabel);
438  selValLayout->addWidget(_selValEdit);
439 
440  _interpComboBox = new QComboBox;
441  _interpComboBox->addItem("None");
442  _interpComboBox->addItem("Linear");
443  _interpComboBox->addItem("Smooth");
444  _interpComboBox->addItem("Spline");
445  _interpComboBox->addItem("MSpline");
446  _interpComboBox->setCurrentIndex(4);
447  _interpComboBox->setFixedWidth(70);
448  _interpComboBox->setFixedHeight(20);
449 
450  editsLayout->addWidget(selPos);
451  editsLayout->addWidget(selVal);
452  editsLayout->addWidget(_interpComboBox);
453 
454  QFrame *curveFrame = new QFrame;
455  curveFrame->setFrameShape(QFrame::Panel);
456  curveFrame->setFrameShadow(QFrame::Sunken);
457  curveFrame->setLineWidth(1);
458  QHBoxLayout *curveFrameLayout = new QHBoxLayout;
459  curveFrameLayout->setMargin(0);
460  CurveGraphicsView *curveView = new CurveGraphicsView;
461  curveView->setFrameShape(QFrame::Panel);
462  curveView->setFrameShadow(QFrame::Sunken);
463  curveView->setLineWidth(1);
464  curveView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
465  curveView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
466  _scene = new CCurveScene;
467  curveView->setScene(_scene);
468  curveView->setTransform(QTransform().scale(1, -1));
469  curveView->setRenderHints(QPainter::Antialiasing);
470  curveFrameLayout->addWidget(curveView);
471  curveFrame->setLayout(curveFrameLayout);
472 
473  mainLayout->addWidget(edits);
474  mainLayout->addWidget(curveFrame);
475  if(expandable){
476  QPushButton* expandButton=new QPushButton(">");
477  expandButton->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding);
478  expandButton->setFixedWidth(15);
479  mainLayout->addWidget(expandButton);
480  // open a the detail widget when clicked
481  connect(expandButton, SIGNAL(clicked()), this, SLOT(openDetail()));
482  }
483  mainLayout->setStretchFactor(curveFrame,100);
484  setLayout(mainLayout);
485 
486  // SIGNALS
487 
488  // when a user selects a cv, update the fields on left
489  connect(_scene, SIGNAL(cvSelected(double, SeExpr2::SeExpr2::Vec3d, T_INTERP)), this, SLOT(cvSelectedSlot(double, SeExpr2::SeExpr2::Vec3d, T_INTERP)));
490  // when a user selects a different interp, the curve has to redraw
491  connect(_interpComboBox, SIGNAL(activated(int)), _scene, SLOT(interpChanged(int)));
492  // when a user types a different position, the curve has to redraw
493  connect(_selPosEdit, SIGNAL(returnPressed()), this, SLOT(selPosChanged()));
494  connect(this, SIGNAL(selPosChangedSignal(double)), _scene, SLOT(selPosChanged(double)));
495  // when a user selects a different color, the ramp has to redraw
497  connect(_selValEdit, SIGNAL(swatchChanged(QColor)), this, SLOT(internalSwatchChanged(QColor)));
498  // when the widget is resized, resize the curve widget
499  connect(curveView, SIGNAL(resizeSignal(int, int)), _scene, SLOT(resize(int, int)));
500 }
501 
502 
503 // CV selected, update the user interface fields.
504 void ExprColorCurve::cvSelectedSlot(const double pos, const SeExpr2::Vec3d val, const T_INTERP interp)
505 {
506  QString posStr;
507  if (pos >= 0.0) {
508  posStr.setNum(pos, 'f', 3);
509  _selPosEdit->setText(posStr);
510  _selValEdit->setValue(val);
511  emit swatchChanged(QColor::fromRgbF(val[0],val[1],val[2],1));
512  _interpComboBox->setCurrentIndex(interp);
513  }
514 }
515 
516 // User entered new position, round and send signal to redraw curve.
518 {
519  double pos = SeExpr2::clamp(QString(_selPosEdit->text()).toFloat(),0,1);
520  _selPosEdit->setText(QString("%1").arg(pos, 0, 'f', 3));
521  emit selPosChangedSignal(pos);
522 }
523 
524 void ExprColorCurve::addPoint(const double x, const SeExpr2::Vec3d y, const T_INTERP interp, const bool select)
525 {
526  _scene->addPoint(x, y, interp, select);
527 }
528 
530 {
531  SeExpr2::Vec3d newColor(color.redF(),color.greenF(),color.blueF());
532  _scene->selValChanged(newColor);
533  _selValEdit->setValue(newColor);
534 }
535 
537 {
539  return QColor::fromRgbF(val[0],val[1],val[2],1);
540 }
541 
543 {
544  emit swatchChanged(color);
545 }
546 
548 {
549  QDialog* dialog=new QDialog();
550  dialog->setMinimumWidth(1024);
551  dialog->setMinimumHeight(400);
552  ExprColorCurve* curve=new ExprColorCurve(0,"","","",false);
553 
554  // copy points into new data
555  const std::vector<T_CURVE::CV >& data=_scene->_cvs;
556  typedef std::vector<T_CURVE::CV >::const_iterator ITERATOR;
557  for(ITERATOR i=data.begin();i!=data.end();++i)
558  curve->addPoint(i->_pos,i->_val,i->_interp);
559 
560  QVBoxLayout* layout=new QVBoxLayout();
561  dialog->setLayout(layout);
562  layout->addWidget(curve);
563 
564  dialog->setLayout(layout);
565  layout->addWidget(curve);
566  QDialogButtonBox* buttonbar=new QDialogButtonBox();
567  buttonbar->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
568  connect(buttonbar,SIGNAL(accepted()),dialog,SLOT(accept()));
569  connect(buttonbar,SIGNAL(rejected()),dialog,SLOT(reject()));
570  layout->addWidget(buttonbar);
571 
572  if(dialog->exec()==QDialog::Accepted){
573  // copy points back from child
574  _scene->removeAll();
575  const std::vector<T_CURVE::CV >& dataNew=curve->_scene->_cvs;
576  typedef std::vector<T_CURVE::CV >::const_iterator ITERATOR;
577  for(ITERATOR i=dataNew.begin();i!=dataNew.end();++i)
578  addPoint(i->_pos,i->_val,i->_interp);
580  }
581 }
582 
CCurveScene * _curveScene
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent)
void curveChanged()
virtual void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent)
SeExpr2::CurveFuncX curve
void preparePoints()
Prepares points for evaluation (sorts and computes boundaries, clamps extrema)
Definition: Curve.cpp:56
SeExpr2::Vec3d _color
ExprCSwatchFrame * _selValEdit
virtual void keyPressEvent(QKeyEvent *event)
void selValChanged(const SeExpr2::Vec3d &val)
Interpolation curve class for double-&gt;double and double-&gt;Vec3D.
Definition: Curve.h:38
T_CURVE::InterpType T_INTERP
void resize(const int width, const int height)
QComboBox * _interpComboBox
void rebuildCurve()
QLineEdit * _selPosEdit
std::vector< T_CURVE::CV > _cvs
void selValChangedSignal(SeExpr2::Vec3d value)
InterpType _interp
Definition: Curve.h:55
QPixmap _pixmap
T getValue(const double param) const
Evaluates curve and returns full value.
Definition: Curve.cpp:104
QGraphicsProxyWidget * _baseRect
virtual void mousePressEvent(QMouseEvent *event)
void internalSwatchChanged(QColor color)
CV getLowerBoundCV(const double param) const
Definition: Curve.cpp:199
std::vector< QGraphicsEllipseItem * > _circleObjects
void addPoint(double x, const SeExpr2::Vec3d y, const T_INTERP interp, const bool select=true)
void selPosChangedSignal(double pos)
SeExpr2::Vec3d getValue() const
For any rgb or hsl value(except for negative s values)
void setValue(const SeExpr2::Vec3d &value)
virtual void paintEvent(QPaintEvent *event)
double _pos
Definition: Curve.h:53
QPixmap & getPixmap()
double max(double x, double y)
Definition: ExprBuiltins.h:42
The result is computed int int< br >< divstyle="margin-left:40px;"> Picks values randomly between loRange and hiRange based on supplied index(which is automatically hashed).&nbsp
ExprColorCurve(QWidget *parent=0, QString pLabel="", QString vLabel="", QString iLabel="", bool expandable=true)
Vec< double, 3, false > Vec3d
Definition: Vec.h:368
void removePoint(const int index)
SeExpr2::Curve< SeExpr2::Vec3d > T_CURVE
double min(double x, double y)
Definition: ExprBuiltins.h:43
void selPosChanged(double pos)
QWidget * _baseRectW
static const int p[514]
Definition: NoiseTables.h:20
T_INTERP _interp
CCurveScene * _scene
QColor getSwatchColor()
T_CURVE * _curve
void interpChanged(const int interp)
void cvSelectedSlot(const double pos, const SeExpr2::Vec3d val, const T_INTERP interp)
</pre >< h3 > A simple variable reference</h3 > This is not a very interesting subclass of expression until we add some additional variables Variables on some applications may be very dynamic In this we only need x
Definition: tutorial.txt:108
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent)
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
void emitCurveChanged()
At the mid point
Definition: userdoc.txt:136
virtual void paintEvent(QPaintEvent *event)
void addPoint(const double x, const SeExpr2::Vec3d y, const T_INTERP interp, bool select=false)
void selValChangedSignal(SeExpr2::Vec3d val)
double clamp(double x, double lo, double hi)
Definition: ExprBuiltins.h:40
ExprCSwatchFrame(SeExpr2::Vec3d value, QWidget *parent=0)
void swatchChanged(QColor color)
void addPoint(double position, const T &val, InterpType type)
Adds a point to the curve.
Definition: Curve.cpp:50
InterpType
Supported interpolation types.
Definition: Curve.h:43
void cvSelected(double x, const SeExpr2::Vec3d y, const T_INTERP interp)
QByteArray getCPixmap()
void swatchChanged(QColor color)
This is the same as the prman cellnoise function< br ></div >< br > float< b > float y< br > float< b > float y
Definition: userdoc.txt:218
void setSwatchColor(QColor color)
SeExpr2::Vec3d _value