Panda3D
panda
src
pnmimage
pnmBrush.I
1
// Filename: pnmBrush.I
2
// Created by: drose (01Feb07)
3
//
4
////////////////////////////////////////////////////////////////////
5
//
6
// PANDA 3D SOFTWARE
7
// Copyright (c) Carnegie Mellon University. All rights reserved.
8
//
9
// All use of this software is subject to the terms of the revised BSD
10
// license. You should have received a copy of this license along
11
// with this source code in a file named "LICENSE."
12
//
13
////////////////////////////////////////////////////////////////////
14
15
16
////////////////////////////////////////////////////////////////////
17
// Function: PNMBrush::Constructor
18
// Access: Protected
19
// Description:
20
////////////////////////////////////////////////////////////////////
21
INLINE PNMBrush::
22
PNMBrush(
float
xc,
float
yc) : _xc(xc), _yc(yc) {
23
}
24
25
////////////////////////////////////////////////////////////////////
26
// Function: PNMBrush::get_xc
27
// Access: Protected
28
// Description: Returns the coordinates of the brush's center
29
// pixel. For a one-pixel brush, this will be (0.5,
30
// 0.5); for a centered two-pixel brush, this will be
31
// (1.0, 1.0); for a centered three-pixel brush, this
32
// will be (1.5, 1.5); and so on.
33
////////////////////////////////////////////////////////////////////
34
INLINE
float
PNMBrush::
35
get_xc
()
const
{
36
return
_xc;
37
}
38
39
////////////////////////////////////////////////////////////////////
40
// Function: PNMBrush::get_xc
41
// Access: Protected
42
// Description: Returns the coordinates of the brush's center
43
// pixel. For a one-pixel brush, this will be (0.5,
44
// 0.5); for a centered two-pixel brush, this will be
45
// (1.0, 1.0); for a centered three-pixel brush, this
46
// will be (1.5, 1.5); and so on.
47
////////////////////////////////////////////////////////////////////
48
INLINE
float
PNMBrush::
49
get_yc
()
const
{
50
return
_yc;
51
}
PNMBrush::get_yc
float get_yc() const
Returns the coordinates of the brush's center pixel.
Definition:
pnmBrush.I:49
PNMBrush::get_xc
float get_xc() const
Returns the coordinates of the brush's center pixel.
Definition:
pnmBrush.I:35
Generated on Wed May 17 2017 23:46:31 for Panda3D by
1.8.13