Possible add-on properties for vtk.js: gridLines: True, axisLabels: None, axisTitlePixelOffset: 35.0, axisTextStyle: { fontColor: 'white', fontStyle: 'normal', fontSize: 18, fontFamily: 'serif', }, t
(parent, actor, actorId, context, depth)
| 1084 | # ----------------------------------------------------------------------------- |
| 1085 | |
| 1086 | def cubeAxesSerializer(parent, actor, actorId, context, depth): |
| 1087 | """ |
| 1088 | Possible add-on properties for vtk.js: |
| 1089 | gridLines: True, |
| 1090 | axisLabels: None, |
| 1091 | axisTitlePixelOffset: 35.0, |
| 1092 | axisTextStyle: { |
| 1093 | fontColor: 'white', |
| 1094 | fontStyle: 'normal', |
| 1095 | fontSize: 18, |
| 1096 | fontFamily: 'serif', |
| 1097 | }, |
| 1098 | tickLabelPixelOffset: 12.0, |
| 1099 | tickTextStyle: { |
| 1100 | fontColor: 'white', |
| 1101 | fontStyle: 'normal', |
| 1102 | fontSize: 14, |
| 1103 | fontFamily: 'serif', |
| 1104 | }, |
| 1105 | """ |
| 1106 | axisLabels = ["", "", ""] |
| 1107 | if actor.GetXAxisLabelVisibility(): |
| 1108 | axisLabels[0] = actor.GetXTitle() |
| 1109 | if actor.GetYAxisLabelVisibility(): |
| 1110 | axisLabels[1] = actor.GetYTitle() |
| 1111 | if actor.GetZAxisLabelVisibility(): |
| 1112 | axisLabels[2] = actor.GetZTitle() |
| 1113 | |
| 1114 | return { |
| 1115 | "parent": getReferenceId(parent), |
| 1116 | "id": actorId, |
| 1117 | "type": "vtkCubeAxesActor", |
| 1118 | "properties": { |
| 1119 | # vtkProp |
| 1120 | "visibility": actor.GetVisibility(), |
| 1121 | "pickable": actor.GetPickable(), |
| 1122 | "dragable": actor.GetDragable(), |
| 1123 | "useBounds": actor.GetUseBounds(), |
| 1124 | # vtkProp3D |
| 1125 | "origin": actor.GetOrigin(), |
| 1126 | "position": actor.GetPosition(), |
| 1127 | "scale": actor.GetScale(), |
| 1128 | # vtkActor |
| 1129 | "forceOpaque": actor.GetForceOpaque(), |
| 1130 | "forceTranslucent": actor.GetForceTranslucent(), |
| 1131 | # vtkCubeAxesActor |
| 1132 | "dataBounds": actor.GetBounds(), |
| 1133 | "faceVisibilityAngle": 8, |
| 1134 | "gridLines": True, |
| 1135 | "axisLabels": axisLabels, |
| 1136 | "axisTitlePixelOffset": 35.0, |
| 1137 | "axisTextStyle": { |
| 1138 | "fontColor": "white", |
| 1139 | "fontStyle": "normal", |
| 1140 | "fontSize": 18, |
| 1141 | "fontFamily": "serif", |
| 1142 | }, |
| 1143 | "tickLabelPixelOffset": 12.0, |
nothing calls this directly
no test coverage detected