1 /* 2 * Copyright (c) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #include "texgine_text_blob.h" 17 18 namespace OHOS { 19 namespace Rosen { 20 namespace TextEngine { GetTextBlob() const21std::shared_ptr<RSTextBlob> TexgineTextBlob::GetTextBlob() const 22 { 23 return textBlob_; 24 } 25 SetTextBlob(const std::shared_ptr<RSTextBlob> textBlob)26void TexgineTextBlob::SetTextBlob(const std::shared_ptr<RSTextBlob> textBlob) 27 { 28 textBlob_ = textBlob; 29 } 30 GetGlyphIDs(std::vector<uint16_t> & glyphIds)31void TexgineTextBlob::GetGlyphIDs(std::vector<uint16_t>& glyphIds) 32 { 33 RSTextBlob::GetDrawingGlyphIDforTextBlob(textBlob_.get(), glyphIds); 34 } 35 GetPathbyGlyphID(const uint16_t & glyphId)36RSPath TexgineTextBlob::GetPathbyGlyphID(const uint16_t& glyphId) 37 { 38 return RSTextBlob::GetDrawingPathforTextBlob(glyphId, textBlob_.get()); 39 } 40 41 } // namespace TextEngine 42 } // namespace Rosen 43 } // namespace OHOS 44