repo.or.cz
/
phpCairo.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Added some test cases ....
[phpCairo.git]
/
testcases
/
phpCairo
/
caps-sub-paths.php
blob
7c1bf3a60c4c5e2bda7f1dd9926fdd2dc5dcc769
1
<
?
2
$sur
=
new
CairoImageSurface
(
FORMAT_ARGB32
,
20
,
20
);
3
$con
=
new
CairoContext
(
$sur
);
4
5
$con
->
save
();
6
$con
->
set_source_rgb
(
1
,
1
,
1
);
7
$con
->
paint
();
8
$con
->
restore
();
9
10
$con
->
set_line_width
(
4
);
11
$con
->
set_line_cap
(
LINE_CAP_ROUND
);
12
$con
->
move_to
(
4
,
4
);
13
$con
->
line_to
(
4
,
16
);
14
$con
->
move_to
(
10
,
4
);
15
$con
->
line_to
(
10
,
16
);
16
$con
->
move_to
(
16
,
4
);
17
$con
->
line_to
(
16
,
16
);
18
19
$con
->
stroke
();
20
$sur
->
write_to_png
(
"caps-sub-paths-php.png"
);