Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
ncphp
/
mcClasses
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b08b5eb6
authored
Feb 17, 2014
by
sn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
svg kleinigkeiten
1 parent
cb42af21
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
docs/Einheite.ods
file/class_mcSvg.inc.php
docs/Einheite.ods
0 → 100644
View file @
b08b5eb
No preview for this file type
file/class_mcSvg.inc.php
View file @
b08b5eb
<?php
class
mcSvg
{
public
static
function
getGraticuleAsDomElement
(
DOMElement
$param_domelement
,
$param_x
=
0
,
$param_y
=
0
,
$param_lenght
=
10
,
$param_disableCircleIfSmallAs
=
false
)
{
public
static
function
getGraticuleAsDomElement
(
DOMElement
$param_domelement
,
$param_x
=
0
,
$param_y
=
0
,
$param_lenght
=
10
,
$param_disableCircleIfSmallAs
=
false
,
$param_color
=
'black'
)
{
$group
=
new
DOMElement
(
'g'
);
$group
=
$param_domelement
->
appendChild
(
$group
);
...
...
@@ -11,7 +11,7 @@ class mcSvg {
$circle
->
setAttribute
(
'cx'
,
$param_x
);
$circle
->
setAttribute
(
'cy'
,
$param_y
);
$circle
->
setAttribute
(
'r'
,
$param_lenght
/
3
);
$circle
->
setAttribute
(
'style'
,
'fill:#FFFFFF; stroke:
black
; stroke-width:.01cm;'
);
$circle
->
setAttribute
(
'style'
,
'fill:#FFFFFF; stroke:
'
.
$param_color
.
'
; stroke-width:.01cm;'
);
}
...
...
@@ -21,14 +21,14 @@ class mcSvg {
$line_vertikal
->
setAttribute
(
'y1'
,
$param_y
-
(
$param_lenght
/
2
));
$line_vertikal
->
setAttribute
(
'x2'
,
$param_x
);
$line_vertikal
->
setAttribute
(
'y2'
,
$param_y
+
(
$param_lenght
/
2
));
$line_vertikal
->
setAttribute
(
'style'
,
'stroke:
black
; stroke-width:.01cm;'
);
$line_vertikal
->
setAttribute
(
'style'
,
'stroke:
'
.
$param_color
.
'
; stroke-width:.01cm;'
);
$line_horizontal
=
$group
->
appendChild
(
new
DOMElement
(
'line'
));
$line_horizontal
->
setAttribute
(
'x1'
,
$param_x
-
(
$param_lenght
/
2
));
$line_horizontal
->
setAttribute
(
'y1'
,
$param_y
);
$line_horizontal
->
setAttribute
(
'x2'
,
$param_x
+
(
$param_lenght
/
2
));
$line_horizontal
->
setAttribute
(
'y2'
,
$param_y
);
$line_horizontal
->
setAttribute
(
'style'
,
'stroke:
black
; stroke-width:.01cm;'
);
$line_horizontal
->
setAttribute
(
'style'
,
'stroke:
'
.
$param_color
.
'
; stroke-width:.01cm;'
);
return
$group
;
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment