当前位置: 首页>>代码示例>>C++>>正文


C++ ImageEffectDescriptor::defineCustomParam方法代码示例

本文整理汇总了C++中ofx::ImageEffectDescriptor::defineCustomParam方法的典型用法代码示例。如果您正苦于以下问题:C++ ImageEffectDescriptor::defineCustomParam方法的具体用法?C++ ImageEffectDescriptor::defineCustomParam怎么用?C++ ImageEffectDescriptor::defineCustomParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ofx::ImageEffectDescriptor的用法示例。


在下文中一共展示了ImageEffectDescriptor::defineCustomParam方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: describeInContext


//.........这里部分代码省略.........

  page1->addChild(*i3DParam);

  page1->addChild(PageParamDescriptor::gSkipColumn);

  // boolean
  BooleanParamDescriptor *boolean = desc.defineBooleanParam("bool");
  boolean->setLabels("bool", "bool", "bool");
  boolean->setDefault(false);

  page1->addChild(*boolean);

  // choice 
  ChoiceParamDescriptor *choice = desc.defineChoiceParam("choice");
  choice->setLabels("choice", "choice", "choice");
  choice->appendOption("This", "This");
  choice->appendOption("That", "That");
  choice->appendOption("The Other", "The Other");
  choice->resetOptions();
  choice->appendOption("Tom", "Tom");
  choice->appendOption("Dick", "Dick");
  choice->appendOption("Harry", "Harry");
  choice->setDefault(0);

  page1->addChild(*choice);

  page1->addChild(PageParamDescriptor::gSkipColumn);

  // push button
  PushButtonParamDescriptor *push = desc.definePushButtonParam("push");
  push->setLabels("push me", "push me", "push me Big Nose");
  page1->addChild(*push);

  // make a custom param
  CustomParamDescriptor *custom = desc.defineCustomParam("custom");
  custom->setLabels("custom", "custom", "custom");
  custom->setDefault("wibble");

  // rgba colours
  RGBAParamDescriptor *rgba = desc.defineRGBAParam("rgba");
  rgba->setLabels("rgba", "rgba", "rgba");
  rgba->setDefault(0, 0, 0, 1);

  page1->addChild(*rgba);

  RGBParamDescriptor *rgba2 = desc.defineRGBParam("rgbaCustom");
  rgba2->setLabels("RGB Custom", "RGB Custom", "RGB Custom");
  rgba2->setDefault(0, 1, 1);
  rgba2->setInteractDescriptor(new ColourInteractDescriptor<0>);
  page1->addChild(*rgba2);

  RGBParamDescriptor *rgba3 = desc.defineRGBParam("rgbaCustom2");
  rgba3->setLabels("RGB Custom 2", "RGB Custom 2", "RGB Custom 2");
  rgba3->setDefault(1, 0, 1);
  rgba3->setInteractDescriptor(new ColourInteractDescriptor<1>);
  page1->addChild(*rgba3);

  page1->addChild(PageParamDescriptor::gSkipRow);

  // rgb colour
  RGBParamDescriptor *rgb = desc.defineRGBParam("rgb");
  rgb->setLabels("rgb", "rgb", "rgb");
  rgb->setDefault(0, 0, 0);
  page1->addChild(*rgb);

  // make a 1D double parameter of each type
  describeDoubleParam(desc, "double", eDoubleTypePlain, -100, 100, page2);
  describeDoubleParam(desc, "angle", eDoubleTypeAngle, -100, 100, page2);
  describeDoubleParam(desc, "scale", eDoubleTypeScale, -1, 1, page2);
  describeDoubleParam(desc, "time", eDoubleTypeTime, -100, 100, page2);
  describeDoubleParam(desc, "absoluteTime", eDoubleTypeAbsoluteTime, 0, 1000, page2);
  describeDoubleParam(desc, "X_Value", eDoubleTypeNormalisedX, -1, 1, page2);
  describeDoubleParam(desc, "Y_Value", eDoubleTypeNormalisedY, -1, 1, page2);
  describeDoubleParam(desc, "X_Position", eDoubleTypeNormalisedXAbsolute, -1, 1, page2);
  describeDoubleParam(desc, "Y_Position", eDoubleTypeNormalisedYAbsolute, -1, 1, page2);

  page2->addChild(PageParamDescriptor::gSkipColumn);

  // make a 2D double parameter of each type
  describe2DDoubleParam(desc, "double2D", eDoubleTypePlain, -100, 100, page2);
  describe2DDoubleParam(desc, "angle2D", eDoubleTypeAngle, -100, 100, page2);
  describe2DDoubleParam(desc, "scale2D", eDoubleTypeScale, -1, 1, page2);
  describe2DDoubleParam(desc, "XY_Value", eDoubleTypeNormalisedXY, -1, 1, page2);
  describe2DDoubleParam(desc, "XY_Position", eDoubleTypeNormalisedXYAbsolute, -1, 1, page2);

  page2->addChild(PageParamDescriptor::gSkipColumn);

  // make a 3D double parameter of each type
  describe3DDoubleParam(desc, "double3D", eDoubleTypePlain, -100, 100, page2);
  describe3DDoubleParam(desc, "angle3D", eDoubleTypeAngle, -100, 100, page2);
  describe3DDoubleParam(desc, "scale3D", eDoubleTypeScale, -1, 1, page2);

  // make a string param param of each type
  describeStringParam(desc, "singleLine", eStringTypeSingleLine, page3);
  describeStringParam(desc, "multiLine", eStringTypeMultiLine, page3);
  describeStringParam(desc, "filePath", eStringTypeFilePath, page3);
  describeStringParam(desc, "dirPath", eStringTypeDirectoryPath, page3);
  describeStringParam(desc, "label", eStringTypeLabel, page3);

}
开发者ID:chajaeik,项目名称:openfx,代码行数:101,代码来源:propTester.cpp


注:本文中的ofx::ImageEffectDescriptor::defineCustomParam方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。