コード例 #1
0
ファイル: SkSVGPolygon.cpp プロジェクト: bluebellzhy/chromium
** You may obtain a copy of the License at 
**
**     http://www.apache.org/licenses/LICENSE-2.0 
**
** Unless required by applicable law or agreed to in writing, software 
** distributed under the License is distributed on an "AS IS" BASIS, 
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
** See the License for the specific language governing permissions and 
** limitations under the License.
*/

#include "SkSVGPolygon.h"
#include "SkSVGParser.h"

const SkSVGAttribute SkSVGPolygon::gAttributes[] = {
    SVG_LITERAL_ATTRIBUTE(clip-rule, f_clipRule),
    SVG_LITERAL_ATTRIBUTE(fill-rule, f_fillRule),
    SVG_ATTRIBUTE(points)
};

DEFINE_SVG_INFO(Polygon)

void SkSVGPolygon::addAttribute(SkSVGParser& parser, int attrIndex, 
        const char* attrValue, size_t attrLength) {
    INHERITED::addAttribute(parser, attrIndex, attrValue, attrLength);
}

void SkSVGPolygon::translate(SkSVGParser& parser, bool defState) {
    parser._startElement("polygon");
    SkSVGElement::translate(parser, defState);
    SVG_ADD_ATTRIBUTE(points);
コード例 #2
0
/*
 * Copyright 2006 The Android Open Source Project
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */


#include "SkSVGPaintState.h"
#include "SkSVGElements.h"
#include "SkSVGParser.h"
#include "SkParse.h"

SkSVGAttribute SkSVGPaint::gAttributes[] = {
    SVG_LITERAL_ATTRIBUTE(clip-path, f_clipPath),
    SVG_LITERAL_ATTRIBUTE(clip-rule, f_clipRule),
    SVG_LITERAL_ATTRIBUTE(enable-background, f_enableBackground),
    SVG_ATTRIBUTE(fill),
    SVG_LITERAL_ATTRIBUTE(fill-rule, f_fillRule),
    SVG_ATTRIBUTE(filter),
    SVG_LITERAL_ATTRIBUTE(font-family, f_fontFamily),
    SVG_LITERAL_ATTRIBUTE(font-size, f_fontSize),
    SVG_LITERAL_ATTRIBUTE(letter-spacing, f_letterSpacing),
    SVG_ATTRIBUTE(mask),
    SVG_ATTRIBUTE(opacity),
    SVG_LITERAL_ATTRIBUTE(stop-color, f_stopColor),
    SVG_LITERAL_ATTRIBUTE(stop-opacity, f_stopOpacity),
    SVG_ATTRIBUTE(stroke),
    SVG_LITERAL_ATTRIBUTE(stroke-dasharray, f_strokeDasharray),
    SVG_LITERAL_ATTRIBUTE(stroke-linecap, f_strokeLinecap),
コード例 #3
0
ファイル: SkSVGSVG.cpp プロジェクト: bluebellzhy/chromium
**     http://www.apache.org/licenses/LICENSE-2.0 
**
** Unless required by applicable law or agreed to in writing, software 
** distributed under the License is distributed on an "AS IS" BASIS, 
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
** See the License for the specific language governing permissions and 
** limitations under the License.
*/

#include "SkSVGSVG.h"
#include "SkParse.h"
#include "SkRect.h"
#include "SkSVGParser.h"

const SkSVGAttribute SkSVGSVG::gAttributes[] = {
    SVG_LITERAL_ATTRIBUTE(enable-background, f_enable_background),
    SVG_ATTRIBUTE(height),
    SVG_ATTRIBUTE(overflow),
    SVG_ATTRIBUTE(width),
    SVG_ATTRIBUTE(version),
    SVG_ATTRIBUTE(viewBox),
    SVG_LITERAL_ATTRIBUTE(xml:space, f_xml_space),
    SVG_ATTRIBUTE(xmlns),
    SVG_LITERAL_ATTRIBUTE(xmlns:xlink, f_xml_xlink)
};

DEFINE_SVG_INFO(SVG)


bool SkSVGSVG::isFlushable() {
    return false;
コード例 #4
0
/*
 * Copyright 2006 The Android Open Source Project
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */


#include "SkSVGFeColorMatrix.h"
#include "SkSVGParser.h"

const SkSVGAttribute SkSVGFeColorMatrix::gAttributes[] = {
    SVG_LITERAL_ATTRIBUTE(color-interpolation-filters, f_color_interpolation_filters),
    SVG_ATTRIBUTE(result),
    SVG_ATTRIBUTE(type),
    SVG_ATTRIBUTE(values)
};

DEFINE_SVG_INFO(FeColorMatrix)

void SkSVGFeColorMatrix::translate(SkSVGParser& parser, bool defState) {
    INHERITED::translate(parser, defState);
}