CanvasProperty.h revision 52244fff29042926e21fa897ef5ab11148e35299
152244fff29042926e21fa897ef5ab11148e35299John Reck/*
252244fff29042926e21fa897ef5ab11148e35299John Reck * Copyright (C) 2014 The Android Open Source Project
352244fff29042926e21fa897ef5ab11148e35299John Reck *
452244fff29042926e21fa897ef5ab11148e35299John Reck * Licensed under the Apache License, Version 2.0 (the "License");
552244fff29042926e21fa897ef5ab11148e35299John Reck * you may not use this file except in compliance with the License.
652244fff29042926e21fa897ef5ab11148e35299John Reck * You may obtain a copy of the License at
752244fff29042926e21fa897ef5ab11148e35299John Reck *
852244fff29042926e21fa897ef5ab11148e35299John Reck *      http://www.apache.org/licenses/LICENSE-2.0
952244fff29042926e21fa897ef5ab11148e35299John Reck *
1052244fff29042926e21fa897ef5ab11148e35299John Reck * Unless required by applicable law or agreed to in writing, software
1152244fff29042926e21fa897ef5ab11148e35299John Reck * distributed under the License is distributed on an "AS IS" BASIS,
1252244fff29042926e21fa897ef5ab11148e35299John Reck * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1352244fff29042926e21fa897ef5ab11148e35299John Reck * See the License for the specific language governing permissions and
1452244fff29042926e21fa897ef5ab11148e35299John Reck * limitations under the License.
1552244fff29042926e21fa897ef5ab11148e35299John Reck */
1652244fff29042926e21fa897ef5ab11148e35299John Reck#ifndef CANVASPROPERTY_H
1752244fff29042926e21fa897ef5ab11148e35299John Reck#define CANVASPROPERTY_H
1852244fff29042926e21fa897ef5ab11148e35299John Reck
1952244fff29042926e21fa897ef5ab11148e35299John Reck#include "utils/Macros.h"
2052244fff29042926e21fa897ef5ab11148e35299John Reck#include "utils/VirtualLightRefBase.h"
2152244fff29042926e21fa897ef5ab11148e35299John Reck
2252244fff29042926e21fa897ef5ab11148e35299John Reck#include <SkPaint.h>
2352244fff29042926e21fa897ef5ab11148e35299John Reck
2452244fff29042926e21fa897ef5ab11148e35299John Recknamespace android {
2552244fff29042926e21fa897ef5ab11148e35299John Recknamespace uirenderer {
2652244fff29042926e21fa897ef5ab11148e35299John Reck
2752244fff29042926e21fa897ef5ab11148e35299John Reckclass CanvasPropertyPrimitive : public VirtualLightRefBase {
2852244fff29042926e21fa897ef5ab11148e35299John Reck    PREVENT_COPY_AND_ASSIGN(CanvasPropertyPrimitive);
2952244fff29042926e21fa897ef5ab11148e35299John Reckpublic:
3052244fff29042926e21fa897ef5ab11148e35299John Reck    CanvasPropertyPrimitive(float initialValue) : value(initialValue) {}
3152244fff29042926e21fa897ef5ab11148e35299John Reck
3252244fff29042926e21fa897ef5ab11148e35299John Reck    float value;
3352244fff29042926e21fa897ef5ab11148e35299John Reck};
3452244fff29042926e21fa897ef5ab11148e35299John Reck
3552244fff29042926e21fa897ef5ab11148e35299John Reckclass CanvasPropertyPaint : public VirtualLightRefBase {
3652244fff29042926e21fa897ef5ab11148e35299John Reck    PREVENT_COPY_AND_ASSIGN(CanvasPropertyPaint);
3752244fff29042926e21fa897ef5ab11148e35299John Reckpublic:
3852244fff29042926e21fa897ef5ab11148e35299John Reck    CanvasPropertyPaint(const SkPaint& initialValue) : value(initialValue) {}
3952244fff29042926e21fa897ef5ab11148e35299John Reck
4052244fff29042926e21fa897ef5ab11148e35299John Reck    SkPaint value;
4152244fff29042926e21fa897ef5ab11148e35299John Reck};
4252244fff29042926e21fa897ef5ab11148e35299John Reck
4352244fff29042926e21fa897ef5ab11148e35299John Reck} /* namespace uirenderer */
4452244fff29042926e21fa897ef5ab11148e35299John Reck} /* namespace android */
4552244fff29042926e21fa897ef5ab11148e35299John Reck
4652244fff29042926e21fa897ef5ab11148e35299John Reck#endif /* CANVASPROPERTY_H */
47