Debian Codegraph @

third_party/rust/wpf-gpu-raster/src/geometry_sink.rs

raw
1 use crate::aacoverage::CCoverageInterval;
2 use crate::nullable_ref::Ref;
3 use crate::types::*;
4
5 pub trait IGeometrySink
6 {
7 //
8 // Aliased geometry output
9 //
10 /*
11 virtual HRESULT AddVertex(
12 __in_ecount(1) const MilPoint2F &ptPosition,
13 // In: Vertex coordinates
14 __out_ecount(1) WORD *pidxOut
15 // Out: Index of vertex
16 ) PURE;
17
18 virtual HRESULT AddIndexedVertices(
19 UINT cVertices,
20 // In: number of vertices
21 __in_bcount(cVertices*uVertexStride) const void *pVertexBuffer,
22 // In: vertex buffer containing the vertices
23 UINT uVertexStride,
24 // In: size of each vertex
25 MilVertexFormat mvfFormat,
26 // In: format of each vertex
27 UINT cIndices,
28 // In: Number of indices
29 __in_ecount(cIndices) const UINT *puIndexBuffer
30 // In: index buffer
31 ) PURE;
32
33 virtual void SetTransformMapping(
34 __in_ecount(1) const MILMatrix3x2 &mat2DTransform
35 ) PURE;
36
37 virtual HRESULT AddTriangle(
38 DWORD idx1,
39 // In: Index of triangle's first vertex
40 DWORD idx2,
41 // In: Index of triangle's second vertex
42 DWORD idx3
43 // In: Index of triangle's third vertex
44 ) PURE;
45
46 //
47 // Trapezoidal AA geometry output
48 //
49 */
50 fn AddComplexScan(&mut self,
51 nPixelY: INT,
52 // In: y coordinate in pixel space
53 pIntervalSpanStart: Ref<CCoverageInterval>
54 // In: coverage segments
55 ) -> HRESULT;
56
57 fn AddTrapezoid(
58 &mut self,
59 rYMin: f32,
60 // In: y coordinate of top of trapezoid
61 rXLeftYMin: f32,
62 // In: x coordinate for top left
63 rXRightYMin: f32,
64 // In: x coordinate for top right
65 rYMax: f32,
66 // In: y coordinate of bottom of trapezoid
67 rXLeftYMax: f32,
68 // In: x coordinate for bottom left
69 rXRightYMax: f32,
70 // In: x coordinate for bottom right
71 rXDeltaLeft: f32,
72 // In: trapezoid expand radius
73 rXDeltaRight: f32
74 // In: trapezoid expand radius
75 ) -> HRESULT;
76
77 fn IsEmpty(&self) -> bool;
78 /*
79 virtual HRESULT AddParallelogram(
80 __in_ecount(4) const MilPoint2F *rgPosition
81 ) PURE;
82
83 //
84 // Query sink status
85 //
86
87 // Some geometry generators don't actually know if they have output
88 // any triangles, so they need to get this information from the geometry sink.
89
90 virtual BOOL IsEmpty() PURE;
91 */
92 }