Lines Matching refs:pv
42 Geom::PathVector pv;
43 SPCurve curve(pv);
47 Geom::PathVector pv;
48 pv.push_back(Geom::Path());
49 SPCurve curve(pv);
53 Geom::PathVector pv((Geom::Path()));
54 pv[0] = path1;
55 TS_ASSERT_EQUALS(SPCurve(pv).get_segment_count() , 3u);
56 pv[0] = path2;
57 TS_ASSERT_EQUALS(SPCurve(pv).get_segment_count() , 2u);
58 pv[0] = path3;
59 TS_ASSERT_EQUALS(SPCurve(pv).get_segment_count() , 4u);
60 pv[0] = path4;
61 TS_ASSERT_EQUALS(SPCurve(pv).get_segment_count() , 0u);
62 pv[0].close();
63 TS_ASSERT_EQUALS(SPCurve(pv).get_segment_count() , 0u);
66 Geom::PathVector pv;
67 pv.push_back(path1);
68 pv.push_back(path2);
69 pv.push_back(path3);
70 pv.push_back(path4);
71 SPCurve curve(pv);
79 Geom::PathVector pv;
80 SPCurve curve(pv);
84 Geom::PathVector pv;
85 pv.push_back(Geom::Path());
86 SPCurve curve(pv);
90 Geom::PathVector pv((Geom::Path()));
91 pv[0] = path1;
92 TS_ASSERT_EQUALS(SPCurve(pv).nodes_in_path() , 3u);
93 pv[0] = path2;
94 TS_ASSERT_EQUALS(SPCurve(pv).nodes_in_path() , 2u); // zero length closing segments do not increase the nodecount.
95 pv[0] = path3;
96 TS_ASSERT_EQUALS(SPCurve(pv).nodes_in_path() , 5u);
97 pv[0] = path4;
98 TS_ASSERT_EQUALS(SPCurve(pv).nodes_in_path() , 1u);
99 pv[0].close();
100 TS_ASSERT_EQUALS(SPCurve(pv).nodes_in_path() , 1u);
103 Geom::PathVector pv;
104 pv.push_back(path1);
105 pv.push_back(path2);
106 pv.push_back(path3);
107 pv.push_back(path4);
108 SPCurve curve(pv);
125 Geom::PathVector pv((Geom::Path()));
126 TS_ASSERT(!SPCurve(pv).is_closed());
127 pv[0].close();
128 TS_ASSERT(SPCurve(pv).is_closed());
137 Geom::PathVector pv(path4);
138 TS_ASSERT_EQUALS(SPCurve(pv).first_segment() , (void*)0);
139 TS_ASSERT_EQUALS(SPCurve(pv).last_segment() , (void*)0);
140 pv[0].close();
141 TS_ASSERT_DIFFERS(SPCurve(pv).first_segment() , (void*)0);
142 TS_ASSERT_DIFFERS(SPCurve(pv).last_segment() , (void*)0);
144 Geom::PathVector pv(1, path4);
145 pv[0].close();
146 TS_ASSERT_EQUALS(*SPCurve(pv).first_segment() , pv[0][0]);
147 TS_ASSERT_EQUALS(*SPCurve(pv).last_segment() , pv[0][0]);
148 pv[0] = path1;
149 TS_ASSERT_EQUALS(*SPCurve(pv).first_segment() , pv[0][0]);
150 TS_ASSERT_EQUALS(*SPCurve(pv).last_segment() , pv[0][2]);
151 pv[0] = path2;
152 TS_ASSERT_EQUALS(*SPCurve(pv).first_segment() , pv[0][0]);
153 TS_ASSERT_EQUALS(*SPCurve(pv).last_segment() , pv[0][1]);
154 pv[0] = path3;
155 TS_ASSERT_EQUALS(*SPCurve(pv).first_segment() , pv[0][0]);
156 TS_ASSERT_EQUALS(*SPCurve(pv).last_segment() , pv[0][3]);
157 pv[0] = path4;
158 TS_ASSERT_EQUALS(SPCurve(pv).first_segment() , (void*)0);
159 TS_ASSERT_EQUALS(SPCurve(pv).last_segment() , (void*)0);
160 pv.clear();
161 pv.push_back(path1);
162 pv.push_back(path2);
163 pv.push_back(path3);
164 TS_ASSERT_EQUALS(*SPCurve(pv).first_segment() , pv[0][0]);
165 TS_ASSERT_EQUALS(*SPCurve(pv).last_segment() , pv[2][3]);*/
170 Geom::PathVector pv;
171 TS_ASSERT_EQUALS(SPCurve(pv).first_path() , (void*)0);
172 TS_ASSERT_EQUALS(SPCurve(pv).last_path() , (void*)0);
173 pv.push_back(path1);
174 TS_ASSERT_EQUALS(*SPCurve(pv).first_path() , pv[0]);
175 TS_ASSERT_EQUALS(*SPCurve(pv).last_path() , pv[0]);
176 pv.push_back(path2);
177 TS_ASSERT_EQUALS(*SPCurve(pv).first_path() , pv[0]);
178 TS_ASSERT_EQUALS(*SPCurve(pv).last_path() , pv[1]);
179 pv.push_back(path3);
180 TS_ASSERT_EQUALS(*SPCurve(pv).first_path() , pv[0]);
181 TS_ASSERT_EQUALS(*SPCurve(pv).last_path() , pv[2]);
182 pv.push_back(path4);
183 TS_ASSERT_EQUALS(*SPCurve(pv).first_path() , pv[0]);
184 TS_ASSERT_EQUALS(*SPCurve(pv).last_path() , pv[3]);
193 Geom::PathVector pv;
194 TS_ASSERT(!SPCurve(pv).first_point());
195 pv.push_back(path1);
196 pv.push_back(path2);
197 pv.push_back(path3);
198 TS_ASSERT_EQUALS(*(SPCurve(pv).first_point()) , Geom::Point(0,0));
199 pv.insert(pv.begin(), path4);
200 TS_ASSERT_EQUALS(*(SPCurve(pv).first_point()) , Geom::Point(3,5));
209 Geom::PathVector pv;
210 TS_ASSERT(!SPCurve(pv).last_point());
211 pv.push_back(path1);
212 pv.push_back(path2);
213 pv.push_back(path3);
214 TS_ASSERT_EQUALS(*(SPCurve(pv).last_point()) , Geom::Point(8,4));
215 pv.push_back(path4);
216 TS_ASSERT_EQUALS(*(SPCurve(pv).last_point()) , Geom::Point(3,5));
225 Geom::PathVector pv;
226 pv.push_back(path1);
227 pv.push_back(path2);
228 pv.push_back(path3);
229 TS_ASSERT_EQUALS( *(SPCurve(pv).second_point()) , Geom::Point(1,0));
230 pv.insert(pv.begin(), path4);
231 TS_ASSERT_EQUALS( *SPCurve(pv).second_point(), Geom::Point(0,0) );
240 Geom::PathVector pv;
241 pv.push_back(path1);
242 pv.push_back(path2);
243 pv.push_back(path3);
244 TS_ASSERT_EQUALS( *(SPCurve(pv).penultimate_point()) , Geom::Point(6,4));
245 pv.push_back(path4);
246 TS_ASSERT_EQUALS( *(SPCurve(pv).penultimate_point()) , Geom::Point(8,4));