当前位置: 首页>>代码示例>>C++>>正文


C++ SkMatrix::writeToMemory方法代码示例

本文整理汇总了C++中SkMatrix::writeToMemory方法的典型用法代码示例。如果您正苦于以下问题:C++ SkMatrix::writeToMemory方法的具体用法?C++ SkMatrix::writeToMemory怎么用?C++ SkMatrix::writeToMemory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SkMatrix的用法示例。


在下文中一共展示了SkMatrix::writeToMemory方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: didSetMatrix

void SkGPipeCanvas::didSetMatrix(const SkMatrix& matrix) {
    NOTIFY_SETUP(this);
    if (this->needOpBytes(matrix.writeToMemory(nullptr))) {
        this->writeOp(kSetMatrix_DrawOp);
        fWriter.writeMatrix(matrix);
    }
    this->INHERITED::didSetMatrix(matrix);
}
开发者ID:Nazi-Nigger,项目名称:gecko-dev,代码行数:8,代码来源:SkGPipeWrite.cpp

示例2: recordConcat

void SkPictureRecord::recordConcat(const SkMatrix& matrix) {
    this->validate(fWriter.bytesWritten(), 0);
    // op + matrix
    size_t size = kUInt32Size + matrix.writeToMemory(nullptr);
    size_t initialOffset = this->addDraw(CONCAT, &size);
    this->addMatrix(matrix);
    this->validate(initialOffset, size);
}
开发者ID:ccsystems,项目名称:skia,代码行数:8,代码来源:SkPictureRecord.cpp

示例3: didSetMatrix

void SkPictureRecord::didSetMatrix(const SkMatrix& matrix) {
    this->validate(fWriter.bytesWritten(), 0);
    // op + matrix
    size_t size = kUInt32Size + matrix.writeToMemory(nullptr);
    size_t initialOffset = this->addDraw(SET_MATRIX, &size);
    this->addMatrix(matrix);
    this->validate(initialOffset, size);
    this->INHERITED::didSetMatrix(matrix);
}
开发者ID:ccsystems,项目名称:skia,代码行数:9,代码来源:SkPictureRecord.cpp

示例4: test_flatten

static void test_flatten(skiatest::Reporter* reporter, const SkMatrix& m) {
    // add 100 in case we have a bug, I don't want to kill my stack in the test
    char buffer[SkMatrix::kMaxFlattenSize + 100];
    uint32_t size1 = m.writeToMemory(NULL);
    uint32_t size2 = m.writeToMemory(buffer);
    REPORTER_ASSERT(reporter, size1 == size2);
    REPORTER_ASSERT(reporter, size1 <= SkMatrix::kMaxFlattenSize);

    SkMatrix m2;
    uint32_t size3 = m2.readFromMemory(buffer);
    REPORTER_ASSERT(reporter, size1 == size3);
    REPORTER_ASSERT(reporter, are_equal(reporter, m, m2));

    char buffer2[SkMatrix::kMaxFlattenSize + 100];
    size3 = m2.writeToMemory(buffer2);
    REPORTER_ASSERT(reporter, size1 == size3);
    REPORTER_ASSERT(reporter, memcmp(buffer, buffer2, size1) == 0);
}
开发者ID:beerbong,项目名称:platform_external_skia,代码行数:18,代码来源:MatrixTest.cpp

示例5: recordConcat

void SkGPipeCanvas::recordConcat(const SkMatrix& m) {
    if (this->needOpBytes(m.writeToMemory(nullptr))) {
        this->writeOp(kConcat_DrawOp);
        fWriter.writeMatrix(m);
    }
}
开发者ID:Nazi-Nigger,项目名称:gecko-dev,代码行数:6,代码来源:SkGPipeWrite.cpp


注:本文中的SkMatrix::writeToMemory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。