void LayerAndroid::dumpLayers(FILE* file, int indentLevel) const { writeln(file, indentLevel, "{"); writeHexVal(file, indentLevel + 1, "layer", (int)this); writeIntVal(file, indentLevel + 1, "layerId", m_uniqueId); writeIntVal(file, indentLevel + 1, "haveClip", m_haveClip); writeIntVal(file, indentLevel + 1, "isRootLayer", m_isRootLayer); writeIntVal(file, indentLevel + 1, "isFixed", m_isFixed); writeFloatVal(file, indentLevel + 1, "opacity", getOpacity()); writeSize(file, indentLevel + 1, "size", getSize()); writePoint(file, indentLevel + 1, "position", getPosition()); writePoint(file, indentLevel + 1, "translation", m_translation); writePoint(file, indentLevel + 1, "anchor", getAnchorPoint()); writePoint(file, indentLevel + 1, "scale", m_scale); if (m_doRotation) writeFloatVal(file, indentLevel + 1, "angle", m_angleTransform); if (m_isFixed) { writeLength(file, indentLevel + 1, "fixedLeft", m_fixedLeft); writeLength(file, indentLevel + 1, "fixedTop", m_fixedTop); writeLength(file, indentLevel + 1, "fixedRight", m_fixedRight); writeLength(file, indentLevel + 1, "fixedBottom", m_fixedBottom); writeLength(file, indentLevel + 1, "fixedMarginLeft", m_fixedMarginLeft); writeLength(file, indentLevel + 1, "fixedMarginTop", m_fixedMarginTop); writeLength(file, indentLevel + 1, "fixedMarginRight", m_fixedMarginRight); writeLength(file, indentLevel + 1, "fixedMarginBottom", m_fixedMarginBottom); writePoint(file, indentLevel + 1, "fixedOffset", m_fixedOffset); writeIntVal(file, indentLevel + 1, "fixedWidth", m_fixedWidth); writeIntVal(file, indentLevel + 1, "fixedHeight", m_fixedHeight); } if (m_recordingPicture) { writeIntVal(file, indentLevel + 1, "picture width", m_recordingPicture->width()); writeIntVal(file, indentLevel + 1, "picture height", m_recordingPicture->height()); } if (countChildren()) { writeln(file, indentLevel + 1, "children = ["); for (int i = 0; i < countChildren(); i++) { if (i > 0) writeln(file, indentLevel + 1, ", "); getChild(i)->dumpLayers(file, indentLevel + 1); } writeln(file, indentLevel + 1, "];"); } writeln(file, indentLevel, "}"); }
virtual void beginLayer(const char* className, const LayerAndroid* layerPtr) { LayerDumper::beginLayer(className, layerPtr); for (int i = 0; i < m_indentLevel; i++) { m_stream->writeText(" "); } m_stream->writeText(className); m_stream->writeText("@"); m_stream->writeHexAsText(layerPtr->uniqueId()); m_stream->writeText(" "); writeHexVal(ID, (int) layerPtr); writeIntVal(LEFT, layerPtr->getPosition().fX); writeIntVal(TOP, layerPtr->getPosition().fY); writeIntVal(WIDTH, layerPtr->getWidth()); writeIntVal(HEIGHT, layerPtr->getHeight()); }
void LayerAndroid::dumpLayer(FILE* file, int indentLevel) const { writeHexVal(file, indentLevel + 1, "layer", (int)this); writeIntVal(file, indentLevel + 1, "layerId", m_uniqueId); writeIntVal(file, indentLevel + 1, "haveClip", m_haveClip); writeIntVal(file, indentLevel + 1, "isFixed", isPositionFixed()); writeFloatVal(file, indentLevel + 1, "opacity", getOpacity()); writeSize(file, indentLevel + 1, "size", getSize()); writePoint(file, indentLevel + 1, "position", getPosition()); writePoint(file, indentLevel + 1, "anchor", getAnchorPoint()); writeMatrix(file, indentLevel + 1, "drawMatrix", m_drawTransform); writeMatrix(file, indentLevel + 1, "transformMatrix", m_transform); writeRect(file, indentLevel + 1, "clippingRect", SkRect(m_clippingRect)); if (m_content) { writeIntVal(file, indentLevel + 1, "m_content.width", m_content->width()); writeIntVal(file, indentLevel + 1, "m_content.height", m_content->height()); } if (m_fixedPosition) return m_fixedPosition->dumpLayer(file, indentLevel); }