Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
175ac7c6
Commit
175ac7c6
authored
Apr 17, 2003
by
Emmanuel Puig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Added AddEllipse: the slider now works ! :)
parent
c87aa25e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
7 deletions
+33
-7
modules/gui/skins/gtk2/gtk2_graphics.cpp
modules/gui/skins/gtk2/gtk2_graphics.cpp
+33
-7
No files found.
modules/gui/skins/gtk2/gtk2_graphics.cpp
View file @
175ac7c6
...
...
@@ -2,7 +2,7 @@
* gtk2_graphics.cpp: GTK2 implementation of the Graphics and Region classes
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_graphics.cpp,v 1.1
0 2003/04/17 16:11:46
karibu Exp $
* $Id: gtk2_graphics.cpp,v 1.1
1 2003/04/17 16:30:40
karibu Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -34,6 +34,7 @@
#include "gtk2_graphics.h"
#include <stdio.h>
#include <math.h>
//---------------------------------------------------------------------------
// GTK2 GRAPHICS
...
...
@@ -128,7 +129,7 @@ GTK2Region::GTK2Region( int x, int y, int w, int h )
//---------------------------------------------------------------------------
GTK2Region
::~
GTK2Region
()
{
/* DeleteObject( Rgn );*/
gdk_region_destroy
(
Rgn
);
}
//---------------------------------------------------------------------------
void
GTK2Region
::
AddPoint
(
int
x
,
int
y
)
...
...
@@ -149,11 +150,36 @@ void GTK2Region::AddRectangle( int x, int y, int w, int h )
//---------------------------------------------------------------------------
void
GTK2Region
::
AddElipse
(
int
x
,
int
y
,
int
w
,
int
h
)
{
/* HRGN Buffer;
Buffer = CreateEllipticRgn( x, y, x + w, y + h );
CombineRgn( Rgn, Buffer, Rgn, 0x2 );
DeleteObject( Buffer );*/
/*FIXME*/
GdkRegion
*
Buffer
;
GdkRectangle
rect
;
rect
.
height
=
1
;
double
ex
,
ey
;
double
a
=
w
/
2
;
double
b
=
h
/
2
;
if
(
!
a
||
!
b
)
return
;
for
(
ey
=
0
;
ey
<
h
;
ey
++
)
{
// Calculate coords
ex
=
a
*
sqrt
(
1
-
ey
*
ey
/
(
b
*
b
)
);
// Upper line
rect
.
x
=
(
gint
)(
x
+
a
-
ex
);
rect
.
y
=
(
gint
)(
y
+
b
-
ey
);
rect
.
width
=
(
gint
)(
2
*
ex
);
Buffer
=
gdk_region_rectangle
(
&
rect
);
gdk_region_union
(
Rgn
,
Buffer
);
gdk_region_destroy
(
Buffer
);
// Lower line
rect
.
y
=
(
gint
)(
y
+
b
+
ey
);
Buffer
=
gdk_region_rectangle
(
&
rect
);
gdk_region_union
(
Rgn
,
Buffer
);
gdk_region_destroy
(
Buffer
);
}
}
//---------------------------------------------------------------------------
void
GTK2Region
::
Move
(
int
x
,
int
y
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment