2014-06-18 21:32:48 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2014 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef Resources_DEFINED
|
|
|
|
#define Resources_DEFINED
|
|
|
|
|
2016-03-17 17:51:11 +00:00
|
|
|
#include "SkRefCnt.h"
|
2014-06-18 21:32:48 +00:00
|
|
|
#include "SkString.h"
|
|
|
|
|
2014-10-26 12:23:53 +00:00
|
|
|
class SkBitmap;
|
2016-12-21 17:01:12 +00:00
|
|
|
class SkData;
|
2015-08-21 14:47:23 +00:00
|
|
|
class SkImage;
|
2015-04-30 21:12:58 +00:00
|
|
|
class SkStreamAsset;
|
|
|
|
class SkTypeface;
|
2014-10-26 12:23:53 +00:00
|
|
|
|
2014-06-18 21:32:48 +00:00
|
|
|
SkString GetResourcePath(const char* resource = "");
|
2014-07-11 19:14:51 +00:00
|
|
|
void SetResourcePath(const char* );
|
2014-06-18 21:32:48 +00:00
|
|
|
|
2014-10-26 12:23:53 +00:00
|
|
|
bool GetResourceAsBitmap(const char* resource, SkBitmap* dst);
|
2016-03-17 17:51:11 +00:00
|
|
|
sk_sp<SkImage> GetResourceAsImage(const char* resource);
|
2017-07-23 17:14:10 +00:00
|
|
|
std::unique_ptr<SkStreamAsset> GetResourceAsStream(const char* resource);
|
2016-12-21 17:01:12 +00:00
|
|
|
sk_sp<SkData> GetResourceAsData(const char* resource);
|
2016-05-12 17:09:30 +00:00
|
|
|
sk_sp<SkTypeface> MakeResourceAsTypeface(const char* resource);
|
2014-10-26 12:23:53 +00:00
|
|
|
|
2014-06-18 21:32:48 +00:00
|
|
|
#endif // Resources_DEFINED
|