~ubuntu-branches/ubuntu/karmic/moon/karmic

« back to all changes in this revision

Viewing changes to src/cornerradius.h

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2009-02-14 12:01:08 UTC
  • Revision ID: james.westby@ubuntu.com-20090214120108-06539vb25vhbd8bn
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 
2
/*
 
3
 * cornerradius.h
 
4
 *
 
5
 * Copyright 2008 Novell, Inc. (http://www.novell.com)
 
6
 *
 
7
 * See the LICENSE file included with the distribution for details.
 
8
 * 
 
9
 */
 
10
 
 
11
#ifndef __MOON_CORNERRADIUS_H__
 
12
#define __MOON_CORNERRADIUS_H__
 
13
 
 
14
/* @SilverlightVersion="2" */
 
15
/* @IncludeInKinds */
 
16
struct CornerRadius {
 
17
        double topLeft;
 
18
        double topRight;
 
19
        double bottomLeft;
 
20
        double bottomRight;
 
21
 
 
22
        CornerRadius ()
 
23
          : topLeft (0), topRight (0),
 
24
            bottomLeft (0), bottomRight (0)
 
25
        {
 
26
        }
 
27
 
 
28
        CornerRadius (double uniformRadius)
 
29
          : topLeft (uniformRadius), topRight (uniformRadius),
 
30
            bottomLeft (uniformRadius), bottomRight (uniformRadius)
 
31
        {
 
32
        }
 
33
 
 
34
        CornerRadius (double topLeft, double topRight,
 
35
                      double bottomLeft, double bottomRight)
 
36
          : topLeft (topLeft), topRight (topRight),
 
37
            bottomLeft (bottomLeft), bottomRight (bottomRight)
 
38
        {
 
39
        }
 
40
 
 
41
        //
 
42
        // FromStr
 
43
        //   Parses @s and return a new CornerRadius in @p.  Returns
 
44
        //   true if this was successful, false otherwise.
 
45
        //
 
46
        static bool FromStr (const char *s, CornerRadius *p);
 
47
};
 
48
 
 
49
#endif /* __MOON_POINT_H__ */