acgivisualstyle.h 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2015 Autodesk, Inc. All rights reserved.
  4. //
  5. // Use of this software is subject to the terms of the Autodesk license
  6. // agreement provided at the time of installation or download, or which
  7. // otherwise accompanies this software in either electronic or hard copy form.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. //
  11. //
  12. // Visual Styles AcGi interfaces
  13. //
  14. #pragma once
  15. #include "acgi.h"
  16. class AcGiImpVisualStyle;
  17. /// <summary>
  18. /// Container for visual style property related enumerations.
  19. /// </summary>
  20. namespace AcGiVisualStyleProperties
  21. {
  22. /// <summary>
  23. /// Describes the properties that can be set/get on a visual style.
  24. /// </summary>
  25. enum Property {
  26. /// <summary>
  27. /// Invalid property.
  28. /// </summary>
  29. kInvalidProperty = -1,
  30. // Face properties
  31. //
  32. /// <summary>
  33. /// See FaceLightingModel summary.
  34. /// </summary>
  35. kFaceLightingModel,
  36. /// <summary>
  37. /// See FaceLightingQuality summary.
  38. /// </summary>
  39. kFaceLightingQuality,
  40. /// <summary>
  41. /// See FaceColorMode summary.
  42. /// </summary>
  43. kFaceColorMode,
  44. /// <summary>
  45. /// See FaceModifiers summary.
  46. /// </summary>
  47. kFaceModifiers,
  48. /// <summary>
  49. /// Double indicating the level of face opacity in the range from
  50. /// 0.0 to 1.0, with 1.0 representing full opacity (0% transparent)
  51. /// and 0.0 representing no opacity (100% transparent).
  52. /// </summary>
  53. kFaceOpacity,
  54. /// <summary>
  55. /// Double representing the specular highlight amount (indicating
  56. /// reflection and shininess values) of the material that is applied
  57. /// to faces.
  58. /// </summary>
  59. kFaceSpecular,
  60. /// <summary>
  61. /// AcCmColor representing the color applied to produce a "monochromatic" effect on faces.
  62. /// </summary>
  63. kFaceMonoColor,
  64. // Edge properties
  65. //
  66. /// <summary>
  67. /// See EdgeModel summary.
  68. /// </summary>
  69. kEdgeModel,
  70. /// <summary>
  71. /// See EdgeStyles summary.
  72. /// </summary>
  73. kEdgeStyles,
  74. /// <summary>
  75. /// AcCmColor representing the color applied to intersection edges.
  76. /// </summary>
  77. kEdgeIntersectionColor,
  78. /// <summary>
  79. /// AcCmColor representing the color applied to obscured edges.
  80. /// </summary>
  81. kEdgeObscuredColor,
  82. /// <summary>
  83. /// EdgeLinePattern applied to obscured edges.
  84. /// See EdgeLinePattern summary.
  85. /// </summary>
  86. kEdgeObscuredLinePattern,
  87. /// <summary>
  88. /// EdgeLinePattern applied to intersection edges.
  89. /// See EdgeLinePattern summary.
  90. /// </summary>
  91. kEdgeIntersectionLinePattern,
  92. /// <summary>
  93. /// Double, in degrees, indicating the angle threshold above which
  94. /// facet edges between adjoining facets will be displayed.
  95. /// </summary>
  96. kEdgeCreaseAngle,
  97. /// <summary>
  98. /// See EdgeModifier summary.
  99. /// </summary>
  100. kEdgeModifiers,
  101. /// <summary>
  102. /// AcCmColor representing the color applied to edges.
  103. /// </summary>
  104. kEdgeColor,
  105. /// <summary>
  106. /// Double indicating the level of edge opacity in the range from
  107. /// 0.0 to 1.0, with 1.0 representing full opacity (0% transparent)
  108. /// and 0.0 representing no opacity (100% transparent).
  109. /// </summary>
  110. kEdgeOpacity,
  111. /// <summary>
  112. /// Int representing edge width in pixels.
  113. /// </summary>
  114. kEdgeWidth,
  115. /// <summary>
  116. /// Int representing the amount, in pixels, that edges should overhang
  117. /// their start and end points.
  118. /// </summary>
  119. kEdgeOverhang,
  120. /// <summary>
  121. /// See EdgeJitterAmount summary.
  122. /// </summary>
  123. kEdgeJitterAmount,
  124. /// <summary>
  125. /// AcCmColor representing the color applied to silhouette edges.
  126. /// </summary>
  127. kEdgeSilhouetteColor,
  128. /// <summary>
  129. /// Short representing silhouette edge width in pixels.
  130. /// </summary>
  131. kEdgeSilhouetteWidth,
  132. /// <summary>
  133. /// Int from 0 to 100 representing the halo gap.
  134. /// </summary>
  135. kEdgeHaloGap,
  136. /// <summary>
  137. /// Unsigned short, between 0 and 2047, indicating the number of
  138. /// isolines to display for curved surfaces.
  139. /// </summary>
  140. kEdgeIsolines,
  141. /// <summary>
  142. /// Bool indicating hide precision enabled. True if enabled,
  143. /// false otherwise.
  144. /// </summary>
  145. kEdgeHidePrecision,
  146. // Display properties
  147. //
  148. /// <summary>
  149. /// See DisplayStyles summary.
  150. /// </summary>
  151. kDisplayStyles,
  152. /// <summary>
  153. /// Double indicating brightness.
  154. /// </summary>
  155. kDisplayBrightness,
  156. /// <summary>
  157. /// See DisplayShadowType summary.
  158. /// </summary>
  159. kDisplayShadowType,
  160. /// <summary>
  161. /// Bool indicating use DB display draw order. True if enabled,
  162. /// false otherwise. When true Z depth is ignored for draw order.
  163. /// </summary>
  164. kUseDrawOrder,
  165. /// <summary>
  166. /// Bool indicating if viewport transparency is enabled. True if enabled,
  167. /// false otherwise.
  168. /// </summary>
  169. kViewportTransparency,
  170. /// <summary>
  171. /// Bool indicating if lighting is enabled. True if enabled, false
  172. /// otherwise.
  173. /// </summary>
  174. kLightingEnabled,
  175. /// <summary>
  176. /// Bool indicating use Posterize global effect. True if enabled,
  177. /// false otherwise.
  178. /// </summary>
  179. kPosterizeEffect,
  180. /// <summary>
  181. /// Bool indicating use Mono global effect. True if enabled,
  182. /// false otherwise.
  183. /// </summary>
  184. kMonoEffect,
  185. /// <summary>
  186. /// Bool indicating use Blur global effect. True if enabled,
  187. /// false otherwise.
  188. /// </summary>
  189. kBlurEffect,
  190. /// <summary>
  191. /// Bool indicating use Pencil global effect. True if enabled,
  192. /// false otherwise.
  193. /// </summary>
  194. kPencilEffect,
  195. /// <summary>
  196. /// Bool indicating use Bloom global effect. True if enabled,
  197. /// false otherwise.
  198. /// </summary>
  199. kBloomEffect,
  200. /// <summary>
  201. /// Bool indicating use Pastel global effect. True if enabled,
  202. /// false otherwise.
  203. /// </summary>
  204. kPastelEffect,
  205. /// <summary>
  206. /// Int indicating blur amount. Range [0.0f, 5.0f].
  207. /// </summary>
  208. kBlurAmount,
  209. /// <summary>
  210. /// Float indicating the angle para of pencil effect. Range [0.0f, 360.0f].
  211. /// </summary>
  212. kPencilAngle,
  213. /// <summary>
  214. /// Int indicating the scale para of pencil effect. Range [0.0f, 3.0f].
  215. /// </summary>
  216. kPencilScale,
  217. /// <summary>
  218. /// Int indicating the pattern para of pencil effect. Range [0, 3].
  219. /// </summary>
  220. kPencilPattern,
  221. /// <summary>
  222. /// AcCmColor indicating the color para of pencil effect.
  223. /// </summary>
  224. kPencilColor,
  225. /// <summary>
  226. /// Float indicating the bright threshold para of bloom effect. Range [0.0f, INF].
  227. /// </summary>
  228. kBloomThreshold,
  229. /// <summary>
  230. /// Float indicating the radius para of bloom effect. Range [1.0f, 5.0f].
  231. /// </summary>
  232. kBloomRadius,
  233. /// <summary>
  234. /// AcCmColor indicating the tint color para.
  235. /// </summary>
  236. kTintColor,
  237. /// <summary>
  238. /// Bool indicating the contrast/brightness/power functions are applied
  239. /// false otherwise.
  240. /// </summary>
  241. kFaceAdjustment,
  242. /// <summary>
  243. /// Adjust overall contrast of image, higher giving more contrast.
  244. /// </summary>
  245. kPostContrast,
  246. /// <summary>
  247. /// Adjust overall brightness of image, higher making it brighter.
  248. /// </summary>
  249. kPostBrightness,
  250. /// <summary>
  251. /// Change the power response curve. For example, gamma correction
  252. /// is a setting of about 0.4. However, this control is meant more
  253. /// as a way to control the appearance of the mid-tones: a lower number
  254. /// brightens the midtones more.
  255. /// </summary>
  256. kPostPower,
  257. /// <summary>
  258. /// Bool indicating the tint color is used. True if enabled,
  259. /// false otherwise.
  260. /// </summary>
  261. kTintEffect,
  262. /// <summary>
  263. /// Float indicating the intensity of bloom effect. Range [0.0f, INF].
  264. /// </summary>
  265. kBloomIntensity,
  266. /// <summary>
  267. /// AcCmColor overrides the color of drawables
  268. /// </summary>
  269. kColor,
  270. /// <summary>
  271. /// Float overrides the transparency of drawables. Range [0.0f, INF].
  272. /// </summary>
  273. kTransparency,
  274. /// <summary>
  275. /// Int indicating the amount of wiggle.
  276. /// </summary>
  277. kEdgeWiggleAmount,
  278. /// <summary>
  279. /// String overrides the edge texture path of drawables.
  280. /// </summary>
  281. kEdgeTexturePath,
  282. /// <summary>
  283. /// Bool. Camera Effect. Keep objects in focus whose distance from the camera is within
  284. /// the Focus Width around the Focus Distance.
  285. /// </summary>
  286. kDepthOfField,
  287. /// <summary>
  288. /// Float specifies the distance from the camera to focus on.
  289. /// </summary>
  290. kFocusDistance,
  291. /// <summary>
  292. /// Float specifies the distance from the focus distance to keep in focus.
  293. /// </summary>
  294. kFocusWidth,
  295. /// <summary>
  296. /// The number of visual style properties
  297. /// </summary>
  298. // NOTE!!! All new properties should be added immediately above kPropertyCount.
  299. kPropertyCount,
  300. /// <summary>
  301. /// The number of visual style properties for Pre-2013 drawing formats
  302. /// </summary>
  303. // kUseDrawOrder is the first new property added for the 2013 format. It is
  304. // also the same value as the pre-2013 property count.
  305. kPropertyCountPre2013 = kUseDrawOrder,
  306. };
  307. ////////////////////////////////////////////////////////////////////////////
  308. // Face properties
  309. //
  310. /// <summary>
  311. /// Describes the lighting model to apply to the faces of drawables.
  312. /// </summary>
  313. enum FaceLightingModel {
  314. /// <summary>
  315. /// Faces are not drawn.
  316. /// </summary>
  317. kInvisible,
  318. /// <summary>
  319. /// Faces are drawn in a constant color.
  320. /// </summary>
  321. kConstant,
  322. /// <summary>
  323. /// Faces are drawn to approximate realistic direct lighting.
  324. /// </summary>
  325. kPhong,
  326. /// <summary>
  327. // Faces are drawn for technical illustration.
  328. /// Gooch, A., Gooch, B., Shirley, P., and Cohen, E. 1998.
  329. /// A non-photorealistic lighting model for automatic technical
  330. /// illustration. In proceedings of the 25th Annual Conference
  331. /// on Computer Graphics and Interactive Techniques SIGGRAPH '98.
  332. /// ACM Press, New York, NY, 447-452.
  333. /// </summary>
  334. kGooch,
  335. /// <summary>
  336. /// Faces are drawn in zebra stripes for surface analysis.
  337. /// </summary>
  338. kZebra
  339. };
  340. /// <summary>
  341. /// Describes the calculation method used for application of
  342. /// lighting effects to faces.
  343. /// </summary>
  344. enum FaceLightingQuality {
  345. /// <summary>
  346. /// Apply no lighting calculations to the faces.
  347. /// </summary>
  348. kNoLighting,
  349. /// <summary>
  350. /// Each face has a color calculated based on its orientation to the
  351. /// light source(s) of the scene.
  352. /// </summary>
  353. kPerFaceLighting,
  354. /// <summary>
  355. /// Each vertex of a face has its color calculated based on its
  356. /// orientation to the light source(s) of the scene.
  357. /// </summary>
  358. kPerVertexLighting,
  359. /// <summary>
  360. /// Each pixel of a face has its color calculated based on its
  361. /// orientation to the light source(s) of the scene.
  362. /// </summary>
  363. kPerPixelLighting
  364. };
  365. /// <summary>
  366. /// Describes modifications that affect the color of a face before
  367. /// any lighting and shading calculations have been performed.
  368. /// </summary>
  369. enum FaceColorMode {
  370. /// <summary>
  371. /// No modifications are to be applied to the faces.
  372. /// </summary>
  373. kNoColorMode,
  374. /// <summary>
  375. /// Apply the color of the drawable to the faces.
  376. /// </summary>
  377. kObjectColor,
  378. /// <summary>
  379. /// Apply the display background color to the faces.
  380. /// </summary>
  381. kBackgroundColor,
  382. /// <summary>
  383. /// All faces are treated as having a specific color, resulting in a
  384. /// "monochromatic" effect.
  385. /// </summary>
  386. kMono,
  387. /// <summary>
  388. /// All faces have the hue and saturation values of their color mapped
  389. /// to the hue and saturation values of a specific color, resulting in
  390. /// a "tinted" effect. The luminance value remains unchanged.
  391. /// </summary>
  392. kTint,
  393. /// <summary>
  394. /// Apply a desaturation percentage to the diffuse color of a material.
  395. /// </summary>
  396. kDesaturate
  397. };
  398. /// <summary>
  399. /// Bitfield that describes modifications to faces made before any
  400. /// lighting and shading calculations have been performed.
  401. /// </summary>
  402. enum FaceModifiers {
  403. /// <summary>
  404. /// Apply no face modifiers to the faces.
  405. /// </summary>
  406. kNoFaceModifiers = 0,
  407. /// <summary>
  408. /// Apply an opacity value to the faces. If unset, faces are displayed with
  409. /// full opacity. If set, faces are displayed with a specified degree of
  410. /// opacity from completely opaque to completely transparent.
  411. /// </summary>
  412. kFaceOpacityFlag = 1,
  413. /// <summary>
  414. /// Apply a specular highlight (indicating reflection and shininess values)
  415. /// to a material that is applied to the faces.
  416. /// </summary>
  417. kSpecularFlag = 2
  418. };
  419. ////////////////////////////////////////////////////////////////////////////
  420. // Edge properties
  421. //
  422. /// <summary>
  423. /// Describes the model to use as a source of edges.
  424. /// </summary>
  425. enum EdgeModel {
  426. /// <summary>
  427. /// No edges will be displayed.
  428. /// </summary>
  429. kNoEdges,
  430. /// <summary>
  431. /// Display isolines, imaginary lines (edges) which represent the curvature
  432. /// and shape of a drawable.
  433. /// </summary>
  434. kIsolines,
  435. /// <summary>
  436. /// Display facet edges, the edges between adjoining facets.
  437. /// </summary>
  438. kFacetEdges,
  439. };
  440. /// <summary>
  441. /// Bitfield which describes the combination of edge styles to display.
  442. /// </summary>
  443. enum EdgeStyles {
  444. /// <summary>
  445. /// No edges styles will be displayed
  446. /// </summary>
  447. kNoEdgeStyle = 0,
  448. /// <summary>
  449. /// Visible edges will be displayed.
  450. /// </summary>
  451. kVisibleFlag = 1,
  452. /// <summary>
  453. /// Silhouette edges will be displayed. A silhouette edge is an edge
  454. /// connecting a back facing polygon with a front facing polygon.
  455. /// </summary>
  456. kSilhouetteFlag = 2,
  457. /// <summary>
  458. /// Obscured edges will be displayed. An obscured edge is that which
  459. /// would not be normally be visible when in a shaded view.
  460. /// </summary>
  461. kObscuredFlag = 4,
  462. /// <summary>
  463. /// Intersection edges will be displayed. An intersection edges is that
  464. /// which is inferred from intersecting facets.
  465. /// </summary>
  466. kIntersectionFlag = 8
  467. };
  468. /// <summary>
  469. /// Bitfield which describes the combination of modifiers to apply to displayed edges.
  470. /// </summary>
  471. enum EdgeModifiers {
  472. /// <summary>
  473. /// Apply no modifiers to the edges.
  474. /// </summary>
  475. kNoEdgeModifiers = 0,
  476. /// <summary>
  477. /// Allow an edge to overhang its start and end points by a specified amount.
  478. /// </summary>
  479. kEdgeOverhangFlag = 1,
  480. /// <summary>
  481. /// Apply a jitter effect to the edges. The jitter effect is produced by drawing
  482. /// extra lines adjacent to the original line, with a specific amount of
  483. /// perturbation away from the original line.
  484. /// </summary>
  485. kEdgeJitterFlag = 2,
  486. /// <summary>
  487. /// Apply a width > 1 to the edges.
  488. /// </summary>
  489. kEdgeWidthFlag = 4,
  490. /// <summary>
  491. /// Apply a color other than the drawable object color to the edges.
  492. /// </summary>
  493. kEdgeColorFlag = 8,
  494. /// <summary>
  495. /// Apply a halo gap percentage to the edges of an object that is hidden
  496. /// by another object, such that the specified gap is displayed between the
  497. /// edges of the hidden object and the edges of the object which hides it.
  498. /// </summary>
  499. kEdgeHaloGapFlag = 16,
  500. /// <summary>
  501. /// Force edges to be on top. Edges will not participate in the Z-ordering
  502. /// of the displayed drawables.
  503. /// </summary>
  504. kAlwaysOnTopFlag = 64,
  505. /// <summary>
  506. /// Apply an opacity value to the edges. If unset, edges are displayed with
  507. /// full opacity. If set, edges are displayed with a specified degree of
  508. /// opacity from completely opaque to completely transparent.
  509. /// </summary>
  510. kEdgeOpacityFlag = 128,
  511. /// <summary>
  512. /// Apply a wiggle effect to the edges. The wiggle effect is produced by drawing
  513. /// extra lines adjacent to the original line, with a specific amount of
  514. /// perturbation away from the original line.
  515. /// </summary>
  516. kEdgeWiggleFlag = 256,
  517. /// <summary>
  518. /// Apply a texture effect to the edges. The texture effect is produced by drawing
  519. /// texure on the original line.
  520. /// </summary>
  521. kEdgeTextureFlag = 512,
  522. };
  523. /// <summary>
  524. /// Describes the amount of jitter effect to apply to edges.
  525. /// </summary>
  526. enum EdgeJitterAmount {
  527. /// <summary>
  528. /// A small amount of perturbation will be applied to edges.
  529. /// </summary>
  530. kJitterLow = 1,
  531. /// <summary>
  532. /// A medium amount of perturbation will be applied to edges.
  533. /// </summary>
  534. kJitterMedium,
  535. /// <summary>
  536. /// A large amount of perturbation will be applied to edges.
  537. /// </summary>
  538. kJitterHigh,
  539. };
  540. /// <summary>
  541. /// Describes the amount of jitter effect to apply to edges.
  542. /// </summary>
  543. enum EdgeWiggleAmount {
  544. /// <summary>
  545. /// A small amount of perturbation will be applied to edges.
  546. /// </summary>
  547. kWiggleLow = 1,
  548. /// <summary>
  549. /// A medium amount of perturbation will be applied to edges.
  550. /// </summary>
  551. kWiggleMedium,
  552. /// <summary>
  553. /// A large amount of perturbation will be applied to edges.
  554. /// </summary>
  555. kWiggleHigh,
  556. };
  557. /// <summary>
  558. /// Describes the raster-based line patterns to apply to edges.
  559. /// </summary>
  560. enum EdgeLinePattern {
  561. /// <summary>
  562. /// Display edges with a solid line pattern.
  563. /// </summary>
  564. kSolid = 1,
  565. /// <summary>
  566. /// Display edges with a dashed line pattern.
  567. /// </summary>
  568. kDashedLine,
  569. /// <summary>
  570. /// Display edges with a dotted line pattern.
  571. /// </summary>
  572. kDotted,
  573. /// <summary>
  574. /// Display edges with a short dashed line pattern.
  575. /// </summary>
  576. kShortDash,
  577. /// <summary>
  578. /// Display edges with a medium dashed line pattern.
  579. /// </summary>
  580. kMediumDash,
  581. /// <summary>
  582. /// Display edges with a long dashed line pattern.
  583. /// </summary>
  584. kLongDash,
  585. /// <summary>
  586. /// Display edges with a double short dashed line pattern.
  587. /// </summary>
  588. kDoubleShortDash,
  589. /// <summary>
  590. /// Display edges with a double medium dashed line pattern.
  591. /// </summary>
  592. kDoubleMediumDash,
  593. /// <summary>
  594. /// Display edges with a double long dashed line pattern.
  595. /// </summary>
  596. kDoubleLongDash,
  597. /// <summary>
  598. /// Display edges with a medium long dashed line pattern.
  599. /// </summary>
  600. kMediumLongDash,
  601. /// <summary>
  602. /// Display edges with a sparse dotted line pattern.
  603. /// </summary>
  604. kSparseDot
  605. };
  606. ////////////////////////////////////////////////////////////////////////////
  607. // Display properties
  608. //
  609. /// <summary>
  610. /// Bitfield which describes the combination of enabled display settings.
  611. /// </summary>
  612. enum DisplayStyles {
  613. /// <summary>
  614. /// No display settings are enabled.
  615. /// </summary>
  616. kNoDisplayStyle = 0,
  617. /// <summary>
  618. /// Backgrounds are displayed.
  619. /// </summary>
  620. kBackgroundsFlag = 1,
  621. /// <summary>
  622. /// Lighting is displayed.
  623. /// </summary>
  624. kLightingFlag = 2,
  625. /// <summary>
  626. /// Materials are displayed.
  627. /// </summary>
  628. kMaterialsFlag = 4,
  629. /// <summary>
  630. /// Textures are displayed.
  631. /// </summary>
  632. kTexturesFlag = 8,
  633. };
  634. /// <summary>
  635. /// Describes the type of shadow to enable.
  636. /// </summary>
  637. enum DisplayShadowType {
  638. /// <summary>
  639. /// No shadows are displayed.
  640. /// </summary>
  641. kShadowsNone,
  642. /// <summary>
  643. /// Ground plane shadows are displayed.
  644. /// </summary>
  645. kShadowsGroundPlane,
  646. /// <summary>
  647. /// Full shadows are displayed.
  648. /// </summary>
  649. kShadowsFull,
  650. /// <summary>
  651. /// Full and ground plane shadows are displayed.
  652. /// </summary>
  653. kShadowsFullAndGround,
  654. };
  655. };
  656. /// <summary>
  657. /// Container for visual style Operation enumeration.
  658. /// </summary>
  659. namespace AcGiVisualStyleOperations
  660. {
  661. /// <summary>
  662. /// Describes what kind of operation to perform when setting a visual
  663. // style property.
  664. /// </summary>
  665. enum Operation {
  666. kInvalidOperation = -1,
  667. /// <summary>
  668. /// Use the last property value specified. NOTE: Reserved for future
  669. /// use. Specifying this currently will be treated the same as kSet.
  670. /// </summary>
  671. kInherit = 0,
  672. /// <summary>
  673. /// Replace the last property value with the one specified.
  674. /// </summary>
  675. kSet,
  676. /// <summary>
  677. /// Disable the specified bits in the property bitmask.
  678. /// </summary>
  679. kDisable,
  680. /// <summary>
  681. /// Enable the specified bits in the property bitmask.
  682. /// </summary>
  683. kEnable
  684. };
  685. };
  686. ////////////////////////////////////////////////////////////////////////
  687. // class AcGiVisualStyle
  688. //
  689. /// <summary>
  690. /// This class defines the collection of visual properties that can be
  691. /// applied to drawables.
  692. /// </summary>
  693. ///
  694. /// <remarks>
  695. ///
  696. /// </remarks>
  697. //
  698. class AcGiVisualStyle : public AcRxObject
  699. {
  700. public:
  701. friend class AcDbImpVisualStyle;
  702. ACRX_DECLARE_MEMBERS(AcGiVisualStyle);
  703. typedef AcGiVisualStyleProperties::Property Property;
  704. typedef AcGiVisualStyleOperations::Operation Operation;
  705. /// <summary>
  706. /// Describes the visual style type, based on multiple property settings.
  707. /// </summary>
  708. enum Type {
  709. // Legacy (shademode) styles
  710. /// <summary>
  711. /// Flat shaded visual style.
  712. /// </summary>
  713. kFlat,
  714. /// <summary>
  715. /// Flat shaded visual style with edges displayed.
  716. /// </summary>
  717. kFlatWithEdges,
  718. /// <summary>
  719. /// Gouraud shaded visual style.
  720. /// </summary>
  721. kGouraud,
  722. /// <summary>
  723. /// Gouraud shaded visual style with edges displayed.
  724. /// </summary>
  725. kGouraudWithEdges,
  726. /// <summary>
  727. /// 2D wireframe visual style (using 2D graphics system).
  728. /// </summary>
  729. k2DWireframe,
  730. /// <summary>
  731. /// 3D wireframe visual style (using 3D graphics system).
  732. /// </summary>
  733. k3DWireframe,
  734. /// <summary>
  735. /// Hidden visual style.
  736. /// </summary>
  737. kHidden,
  738. // Visual Styles
  739. /// <summary>
  740. /// Basic default visual style.
  741. /// </summary>
  742. kBasic,
  743. /// <summary>
  744. /// Phong shaded visual style.
  745. /// </summary>
  746. kRealistic,
  747. /// <summary>
  748. /// Gooch shaded visual style.
  749. /// </summary>
  750. kConceptual,
  751. /// <summary>
  752. /// Custom, user defined visual visual style.
  753. /// </summary>
  754. kCustom,
  755. // Highlight visual styles
  756. /// <summary>
  757. /// Visual style used for a dimming effect.
  758. /// </summary>
  759. kDim,
  760. /// <summary>
  761. /// Visual style used for a brightening effect.
  762. /// </summary>
  763. kBrighten,
  764. /// <summary>
  765. /// Visual style used for a thickening effect.
  766. /// </summary>
  767. kThicken,
  768. /// <summary>
  769. /// Visual style used to apply a line pattern.
  770. /// </summary>
  771. kLinePattern,
  772. /// <summary>
  773. /// Visual style used to apply a face pattern.
  774. /// </summary>
  775. kFacePattern,
  776. /// <summary>
  777. /// Visual style used to apply a change of color.
  778. /// </summary>
  779. kColorChange,
  780. // Face-only/edge-only visual styles
  781. //
  782. /// <summary>
  783. /// Face properties only visual style. All non-face properties are set to inherit.
  784. /// </summary>
  785. kFaceOnly,
  786. /// <summary>
  787. /// Edge properties only visual style. All non-edge properties are set to inherit.
  788. /// </summary>
  789. kEdgeOnly,
  790. /// <summary>
  791. /// Display properties only visual style. All non-display properties are set to inherit.
  792. /// </summary>
  793. kDisplayOnly,
  794. // Edge Style Override visual styles
  795. //
  796. /// <summary>
  797. /// Edge style override visual style with jitter edges off. All other properties are
  798. /// set to inherit.
  799. /// </summary>
  800. kJitterOff,
  801. /// <summary>
  802. /// Edge style override visual style with overhang edges off. All other properties are
  803. /// set to inherit.
  804. /// </summary>
  805. kOverhangOff,
  806. /// <summary>
  807. /// Edge style override visual style with edge color off. All other properties are
  808. /// set to inherit.
  809. /// </summary>
  810. kEdgeColorOff,
  811. /// <summary>
  812. /// shades of gary visual style
  813. /// </summary>
  814. kShadesOfGray,
  815. /// <summary>
  816. /// sketchy visual style
  817. /// </summary>
  818. kSketchy,
  819. /// <summary>
  820. /// xray visual style
  821. /// </summary>
  822. kXRay,
  823. /// <summary>
  824. /// shade with edges visual style
  825. /// </summary>
  826. kShadedWithEdges,
  827. /// <summary>
  828. /// shaded visual style
  829. /// </summary>
  830. kShaded,
  831. /// <summary>
  832. /// dummy visual style
  833. /// </summary>
  834. kByViewport,
  835. /// <summary>
  836. /// dummy visual style
  837. /// </summary>
  838. kByLayer,
  839. /// <summary>
  840. /// dummy visual style
  841. /// </summary>
  842. kByBlock,
  843. /// <summary>
  844. /// Visual style with all properties set to inherit. This effectively
  845. /// creates an empty style upon which a custom visual style can be built.
  846. /// </summary>
  847. kEmptyStyle,
  848. };
  849. /// <summary>
  850. /// Default constructor. Initializes members to default values.
  851. /// </summary>
  852. AcGiVisualStyle (void);
  853. /// <summary>
  854. /// Constructor.
  855. /// </summary>
  856. /// <param name="type">
  857. /// Input Type. The type of visual style to configure - a built-in type or
  858. /// custom.
  859. /// </param>
  860. AcGiVisualStyle (Type type);
  861. /// <summary>
  862. /// Copy constructor. Copies the given visual style into this visual style.
  863. /// </summary>
  864. /// <param name="visualStyle">
  865. /// Input AcGiVisualStyle. A constant reference to the visual style
  866. /// which will be copied into this visual style.
  867. /// </param>
  868. AcGiVisualStyle (const AcGiVisualStyle& visualStyle);
  869. /// <summary>
  870. /// Destructor. Performs any necessary cleanup of the visual style.
  871. /// </summary>
  872. ~AcGiVisualStyle (void);
  873. /// <summary>
  874. /// Assignment operator. Copies the given visual style into this visual style.
  875. /// </summary>
  876. /// <param name="visualStyle">
  877. /// Input AcGiVisualStyle. A constant reference to the visual style
  878. /// which will be copied into this visual style.
  879. /// </param>
  880. /// <returns>
  881. /// Returns a reference to the visual style into which the copy was made.
  882. /// </returns>
  883. AcGiVisualStyle& operator=(const AcGiVisualStyle& visualStyle);
  884. /// <summary>
  885. /// Comparison operator. Compares the given visual style with this visual style.
  886. /// </summary>
  887. /// <param name="visualStyle">
  888. /// Input AcGiVisualStyle. A constant reference to the visual style
  889. /// which will be compared to this visual style.
  890. /// </param>
  891. /// <returns>
  892. /// Returns boolean value representing whether the given visual style is equivalent
  893. /// to this visual style.
  894. /// </returns>
  895. bool operator==(const AcGiVisualStyle& visualStyle) const;
  896. ////////////////////////////////////////////////////////////////////////////
  897. // Type - custom, built-in, face/edge only, etc.
  898. //
  899. /// <summary>
  900. /// Sets the visual style type, modifying multiple properties as necessary to
  901. /// change the visual style into the specified type.
  902. /// </summary>
  903. /// <param name="type">
  904. /// Input enum Type to set into the visual style.
  905. /// </param>
  906. /// <returns>
  907. /// Returns true if successful; otherwise, returns false.
  908. /// </returns>
  909. ACDB_PORT bool setType (Type type);
  910. /// <summary>
  911. /// Gets the visual style type.
  912. /// </summary>
  913. /// <returns>
  914. /// Type of visual style.
  915. /// </returns>
  916. ACDB_PORT Type type (void) const;
  917. ////////////////////////////////////////////////////////////////////////////
  918. // Property set/get
  919. //
  920. /// <summary>
  921. /// Sets the operation associated with a property.
  922. /// </summary>
  923. /// <param name="prop">
  924. /// The AcGiVisualStyleProperties::Property to set the operation for.
  925. /// </param>
  926. /// <param name="op">
  927. /// The AcGiVisualStyleOperations::Operation for the property to use.
  928. /// </param>
  929. /// <returns>
  930. /// Returns true if successful; otherwise, returns false.
  931. /// </returns>
  932. ACDB_PORT virtual bool setTrait (Property prop, Operation op);
  933. /// <summary>
  934. /// Sets a property of the visual style.
  935. /// </summary>
  936. /// <param name="prop">
  937. /// Input AcGiVisualStyleProperties::Property to set into the visual style.
  938. /// </param>
  939. /// <param name="pVal">
  940. /// Input AcGiVariant property value to set into the visual style.
  941. /// </param>
  942. /// <param name="op">
  943. /// Input AcGiVisualStyleOperations::Operation to use when setting the property into the visual style.
  944. /// </param>
  945. /// <returns>
  946. /// Returns true if successful; otherwise, returns false.
  947. /// </returns>
  948. /// <example>
  949. ///
  950. /// // Set brightness to 1.0
  951. /// AcGiVariant displayBrightness.set(1.0);
  952. /// acgiVisualStyle.setTrait (AcGiVisualStyleProperties::kDisplayBrightness, &displayBrightness);
  953. ///
  954. /// </example>
  955. ACDB_PORT virtual bool setTrait (Property prop,
  956. const AcGiVariant *pVal,
  957. Operation op = AcGiVisualStyleOperations::kSet);
  958. /// <summary>
  959. /// Sets an integer property of the visual style.
  960. /// </summary>
  961. /// <param name="prop">
  962. /// Input AcGiVisualStyleProperties::Property to set into the visual style. Valid
  963. /// Property values for this method are:
  964. //// kFaceLightingModel
  965. //// kFaceLightingQuality
  966. //// kFaceColorMode
  967. //// kFaceModifier
  968. //// kEdgeModel
  969. //// kEdgeStyle
  970. //// kEdgeObscuredLinePattern
  971. //// kEdgeIntersectionLinePattern
  972. //// kEdgeModifier
  973. //// kEdgeWidth
  974. //// kEdgeOverhang
  975. //// kEdgeJitter
  976. //// kEdgeSilhouetteWidth
  977. //// kEdgeHaloGap
  978. //// kEdgeIsolines
  979. //// kDisplayStyle
  980. //// kDisplayShadowType
  981. /// </param>
  982. /// <param name="nVal">
  983. /// Input integer property value to set into the visual style.
  984. /// </param>
  985. /// <param name="op">
  986. /// Input AcGiVisualStyleOperations::Operation to use when setting the property into the visual style.
  987. /// </param>
  988. /// <returns>
  989. /// Returns true if successful; otherwise, returns false.
  990. /// </returns>
  991. /// <example>
  992. ///
  993. /// // Set lighting model to kGooch
  994. /// using namespace AcGiVisualStyleProperties;
  995. /// acgiVisualStyle.setTrait (kFaceLightingModel, kGooch);
  996. ///
  997. /// // Set halogap to 20
  998. /// acgiVisualStyle.setTrait (AcGiVisualStyleProperties::kEdgeHaloGap, 20);
  999. ///
  1000. /// </example>
  1001. ACDB_PORT virtual bool setTrait (Property prop,
  1002. int nVal,
  1003. Operation op = AcGiVisualStyleOperations::kSet);
  1004. /// <summary>
  1005. /// Sets a boolean property of the visual style.
  1006. /// </summary>
  1007. /// <param name="prop">
  1008. /// Input AcGiVisualStyleProperties::Property to set into the visual style. Valid
  1009. /// Property values for this method are:
  1010. //// kEdgeHidePrecision
  1011. //// kUseDrawOrder
  1012. //// kIsViewportTransparent
  1013. //// kLightingEnabled
  1014. /// </param>
  1015. /// <param name="bVal">
  1016. /// Input boolean property value to set into the visual style.
  1017. /// </param>
  1018. /// <param name="op">
  1019. /// Input AcGiVisualStyleOperations::Operation to use when setting the property into the visual style.
  1020. /// </param>
  1021. /// <returns>
  1022. /// Returns true if successful; otherwise, returns false.
  1023. /// </returns>
  1024. /// <example>
  1025. ///
  1026. /// // Set hide precision to false
  1027. /// acgiVisualStyle.setTrait (AcGiVisualStyleProperties::kEdgeHidePrecision, false);
  1028. ///
  1029. /// </example>
  1030. ACDB_PORT virtual bool setTrait (Property prop,
  1031. bool bVal,
  1032. Operation op = AcGiVisualStyleOperations::kSet);
  1033. /// <summary>
  1034. /// Sets a double property of the visual style.
  1035. /// </summary>
  1036. /// <param name="prop">
  1037. /// Input AcGiVisualStyleProperties::Property to set into the visual style. Valid
  1038. /// Property values for this method are:
  1039. //// kFaceOpacity
  1040. //// kFaceSpecular
  1041. //// kEdgeCreaseAngle
  1042. //// kEdgeOpacity
  1043. //// kDisplayBrightness
  1044. /// </param>
  1045. /// <param name="dVal">
  1046. /// Input double property value to set into the visual style.
  1047. /// </param>
  1048. /// <param name="op">
  1049. /// Input AcGiVisualStyleOperations::Operation to use when setting the property into the visual style.
  1050. /// </param>
  1051. /// <returns>
  1052. /// Returns true if successful; otherwise, returns false.
  1053. /// </returns>
  1054. /// <example>
  1055. ///
  1056. /// // Set brightness to 1.0
  1057. /// acgiVisualStyle.setTrait (AcGiVisualStyleProperties::kDisplayBrightness, 1.0);
  1058. ///
  1059. /// </example>
  1060. ACDB_PORT virtual bool setTrait (Property prop,
  1061. double dVal,
  1062. Operation op = AcGiVisualStyleOperations::kSet);
  1063. /// <summary>
  1064. /// Sets a color property of the visual style.
  1065. /// </summary>
  1066. /// <param name="prop">
  1067. /// Input AcGiVisualStyleProperties::Property to set into the visual style. Valid
  1068. /// Property values for this method are:
  1069. //// kFaceMonoColor
  1070. //// kEdgeIntersectionColor
  1071. //// kEdgeObscuredColor
  1072. //// kEdgeColor
  1073. //// kEdgeSilhouetteColor
  1074. /// </param>
  1075. /// <param name="red">
  1076. /// Input red color value to set into the visual style. Valid value is from 0.0 to 1.0.
  1077. /// </param>
  1078. /// <param name="green">
  1079. /// Input green color value to set into the visual style. Valid value is from 0.0 to 1.0.
  1080. /// </param>
  1081. /// <param name="blue">
  1082. /// Input blue color value to set into the visual style. Valid value is from 0.0 to 1.0.
  1083. /// </param>
  1084. /// <param name="op">
  1085. /// Input AcGiVisualStyleOperations::Operation to use when setting the property into the visual style.
  1086. /// </param>
  1087. /// <returns>
  1088. /// Returns true if successful; otherwise, returns false.
  1089. /// </returns>
  1090. /// <example>
  1091. ///
  1092. /// // Set edge intersection color to 110% red
  1093. /// acgiVisualStyle.setTrait (AcGiVisualStyleProperties::kEdgeIntersectionColor, 1.1, 1.0, 1.0);
  1094. ///
  1095. /// </example>
  1096. ACDB_PORT virtual bool setTrait (Property prop,
  1097. double red,
  1098. double green,
  1099. double blue,
  1100. Operation op = AcGiVisualStyleOperations::kSet);
  1101. /// <summary>
  1102. /// Sets a color property of the visual style.
  1103. /// </summary>
  1104. /// <param name="prop">
  1105. /// Input AcGiVisualStyleProperties::Property to set into the visual style. Valid
  1106. /// Property values for this method are:
  1107. //// kFaceMonoColor
  1108. //// kEdgeIntersectionColor
  1109. //// kEdgeObscuredColor
  1110. //// kEdgeColor
  1111. //// kEdgeSilhouetteColor
  1112. /// </param>
  1113. /// <param name="pColor">
  1114. /// Input AcCmColor property value to set into the visual style.
  1115. /// </param>
  1116. /// <param name="op">
  1117. /// Input AcGiVisualStyleOperations::Operation to use when setting the property into the visual style.
  1118. /// </param>
  1119. /// <returns>
  1120. /// Returns true if successful; otherwise, returns false.
  1121. /// </returns>
  1122. /// <example>
  1123. ///
  1124. /// // Set monoColor to white
  1125. /// AcCmColor monoColor;
  1126. /// monoColor.setRGB(255,255,255);
  1127. /// acgiVisualStyle.setTrait (AcGiVisualStyleProperties::kFaceMonoColor, &monoColor);
  1128. ///
  1129. /// </example>
  1130. ACDB_PORT virtual bool setTrait (Property prop,
  1131. const AcCmColor *pColor,
  1132. Operation op = AcGiVisualStyleOperations::kSet);
  1133. /// <summary>
  1134. /// Sets a AcString property of the visual style.
  1135. /// </summary>
  1136. /// <param name="prop">
  1137. /// Input AcGiVisualStyleProperties::Property to set into the visual style. Valid
  1138. /// Property values for this method are:
  1139. //// kEdgeTexturePath
  1140. /// </param>
  1141. /// <param name="pStr">
  1142. /// Input AcString property value to set into the visual style.
  1143. /// </param>
  1144. /// <param name="op">
  1145. /// Input AcGiVisualStyleOperations::Operation to use when setting the property into the visual style.
  1146. /// </param>
  1147. /// <returns>
  1148. /// Returns Acad::eOk if successful; otherwise, returns Acad::eInvalidInput.
  1149. /// </returns>
  1150. /// <example>
  1151. ///
  1152. /// AcString texturePath("strokes_ogs.tif");
  1153. /// acdbVisualStyle.setTrait (AcGiVisualStyleProperties::kEdgeTexturePath, &texturePath);
  1154. ///
  1155. /// </example>
  1156. ACDB_PORT virtual bool setTrait (AcGiVisualStyleProperties::Property prop,
  1157. const AcString *pStr,
  1158. AcGiVisualStyleOperations::Operation op
  1159. = AcGiVisualStyleOperations::kSet);
  1160. /// <summary>
  1161. /// Gets a property of the visual style.
  1162. /// </summary>
  1163. /// <param name="prop">
  1164. /// Input AcGiVisualStyleProperties::Property to get from the visual style.
  1165. /// </param>
  1166. /// <param name="pOp">
  1167. /// Output AcGiVisualStyleOperations::Operation to get the operation
  1168. /// currently in effect for this property. If NULL, nothing is returned.
  1169. /// </param>
  1170. /// <returns>
  1171. /// Returns the AcGiVariant value of the property if successful; otherwise,
  1172. /// returns an AcGiVariant of type AcGiVariant::kUndefined.
  1173. /// </returns>
  1174. /// <example>
  1175. ///
  1176. /// AcGiVariant displayBrightness =
  1177. /// acgiVisualStyle.trait (AcGiVisualStyleProperties::kDisplayBrightness);
  1178. ///
  1179. /// </example>
  1180. ACDB_PORT virtual const AcGiVariant& trait (Property prop,
  1181. Operation *pOp = NULL) const;
  1182. /// <summary>
  1183. /// Gets the operation associated with a property.
  1184. /// </summary>
  1185. /// <param name="prop">
  1186. /// Name of the property for which to get the associated operation value.
  1187. /// </param>
  1188. /// <returns>
  1189. /// The operation associated with the property. For invalid property
  1190. /// values, the return value is kInvalidOperation.
  1191. /// </returns>
  1192. ACDB_PORT virtual Operation operation (Property prop) const;
  1193. /// <summary>
  1194. /// Sets a property flag into the visual style, for properties which are bitfield enums.
  1195. /// </summary>
  1196. /// <param name="flagProp">
  1197. /// Input bitfield enum AcGiVisualStyleProperties::Property to set into the visual style.
  1198. /// </param>
  1199. /// <param name="flagVal">
  1200. /// Input bit flag enum unsigned long property to set into the visual style.
  1201. /// </param>
  1202. /// <param name="bEnable">
  1203. /// Input bool set to true to enable the flag, false to disable.
  1204. /// </param>
  1205. /// <returns>
  1206. /// Returns true if successful; otherwise, returns false.
  1207. /// </returns>
  1208. /// <example>
  1209. ///
  1210. /// using namespace AcGiVisualStyleProperties;
  1211. /// acgiVisualStyle.setTraitFlag (kEdgeModifier, kJitter, true);
  1212. ///
  1213. /// </example>
  1214. ACDB_PORT virtual bool setTraitFlag(Property flagProp,
  1215. Adesk::UInt32 flagVal,
  1216. bool bEnable = true);
  1217. /// <summary>
  1218. /// Gets a property flag from the visual style, for properties which are bitfield enums.
  1219. /// </summary>
  1220. /// <param name="flagProp">
  1221. /// Input bitfield enum AcGiVisualStyleProperties::Property to get from the visual style.
  1222. /// </param>
  1223. /// <param name="flagVal">
  1224. /// Input bit flag enum unsigned long property to get from the visual style.
  1225. /// </param>
  1226. /// <returns>
  1227. /// Returns true if flag is enabled, false otherwise.
  1228. /// </returns>
  1229. /// <example>
  1230. ///
  1231. /// using namespace AcGiVisualStyleProperties;
  1232. /// bool bJitterEnabled = acgiVisualStyle.traitFlag(kEdgeModifier, kJitter);
  1233. ///
  1234. /// </example>
  1235. ACDB_PORT virtual bool traitFlag (Property flagProp,
  1236. Adesk::UInt32 flagVal) const;
  1237. /// <summary>
  1238. /// Gets data type of the specified visual style property.
  1239. /// </summary>
  1240. /// <param name="prop">
  1241. /// Input enum AcGiVisualStyleProperties::Property.
  1242. /// </param>
  1243. /// <returns>
  1244. /// Returns the AcGiVariant::VariantType of the specified visual style property.
  1245. /// </returns>
  1246. ACDB_PORT static AcGiVariant::VariantType propertyType(Property prop);
  1247. private:
  1248. const AcGiImpVisualStyle* readImp (void) const;
  1249. AcGiImpVisualStyle* writeImp (void);
  1250. AcGiImpVisualStyle* mpAcGiImpVisualStyle;
  1251. };
  1252. ////////////////////////////////////////////////////////////////////////
  1253. // class AcGiVisualStyleTraits
  1254. ////////////////////////////////////////////////////////////////////////
  1255. /// <summary>
  1256. /// This class defines the visual style traits. Derived from AcGiDrawableTraits,
  1257. /// this class provides the interfaces to implement for setting and returning the
  1258. /// visual style via drawable traits.
  1259. /// </summary>
  1260. ///
  1261. /// <remarks>
  1262. ///
  1263. /// </remarks>
  1264. class AcGiVisualStyleTraits : public AcGiDrawableTraits
  1265. {
  1266. public:
  1267. ACRX_DECLARE_MEMBERS(AcGiVisualStyleTraits);
  1268. /// <summary>
  1269. /// Sets the visual style to capture in the drawable traits.
  1270. /// </summary>
  1271. /// <param name="visualStyle">
  1272. /// Input AcGiVisualStyle const reference to the visual style to capture.
  1273. /// </param>
  1274. virtual void setAcGiVisualStyle (const AcGiVisualStyle& visualStyle) = 0;
  1275. /// <summary>
  1276. /// Reports the visual style that is currently captured in this drawable traits.
  1277. /// </summary>
  1278. /// <returns>
  1279. /// Returns AcGiVisualStyle const reference to the visual style that is
  1280. /// currently captured in this drawable traits.
  1281. /// </returns>
  1282. virtual const AcGiVisualStyle& acgiVisualStyle (void) const = 0;
  1283. };