SkRect rect = SkRect::MakeLTRB(0, 0, 50, 100); float width = rect.width(); // width = 50
SkRect rect = SkRect::MakeLTRB(0, 0, 50, 100); rect.setWidth(75); // rect now has the coordinates (0, 0, 75, 100)
SkRect rect = SkRect::MakeLTRB(0, 0, 50, 100); if (rect.width() > 70) { // do something if the width is greater than 70 }These examples demonstrate how the SkRect width property can be used to manipulate and retrieve information about a rectangle. The SkRect class is part of the Skia Graphics Library, which is an open-source C++ library developed by Google for 2D graphics rendering.