~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to source/blender/compositor/operations/COM_EllipseMaskOperation.cpp

  • Committer: Reinhard Tartler
  • Date: 2014-05-31 01:50:05 UTC
  • mfrom: (14.2.27 sid)
  • Revision ID: siretart@tauware.de-20140531015005-ml6druahuj82nsav
mergeĀ fromĀ debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
{
39
39
        this->m_inputMask = this->getInputSocketReader(0);
40
40
        this->m_inputValue = this->getInputSocketReader(1);
41
 
        const double rad = DEG2RAD((double)this->m_data->rotation);
 
41
        const double rad = (double)this->m_data->rotation;
42
42
        this->m_cosine = cos(rad);
43
43
        this->m_sine = sin(rad);
44
44
        this->m_aspectRatio = ((float)this->getWidth()) / this->getHeight();
45
45
}
46
46
 
47
 
void EllipseMaskOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 
47
void EllipseMaskOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)
48
48
{
49
49
        float inputMask[4];
50
50
        float inputValue[4];
57
57
        rx = this->m_data->x + (this->m_cosine * dx + this->m_sine * dy);
58
58
        ry = this->m_data->y + (-this->m_sine * dx + this->m_cosine * dy);
59
59
        
60
 
        this->m_inputMask->read(inputMask, x, y, sampler);
61
 
        this->m_inputValue->read(inputValue, x, y, sampler);
 
60
        this->m_inputMask->readSampled(inputMask, x, y, sampler);
 
61
        this->m_inputValue->readSampled(inputValue, x, y, sampler);
62
62
        
63
63
        const float halfHeight = (this->m_data->height) / 2.0f;
64
64
        const float halfWidth = this->m_data->width / 2.0f;