Upgrade to Pro — share decks privately, control downloads, hide ads and more …

C++ 製グラフィックライブラリ Skia の紹介 / Introduction to the graphics library Skia written by C++

842aaadff6e13fbf372c9b17b49b031c?s=47 Pine Mizune
September 04, 2019

C++ 製グラフィックライブラリ Skia の紹介 / Introduction to the graphics library Skia written by C++

C++ MIX #5 ( https://cppmix.connpass.com/event/141908/ ) で発表した内容です。

関連ブログ: https://emoji-gen.ninja/blog/posts/20190204/skia.html

---

I presented the presentation in the engineer event named C++ MIX #5 ( https://cppmix.connpass.com/event/141908/ ) in Tokyo Japan.

See also: https://emoji-gen.ninja/blog/posts/20190204/skia.html (Japanese)

842aaadff6e13fbf372c9b17b49b031c?s=128

Pine Mizune

September 04, 2019
Tweet

Transcript

  1. $ .*9 0DU 1JOF.J[VOF $ ੡άϥϑΟοΫϥΠϒϥϦ 4LJB ͷ঺հ *OUSPEVDUJPOUPUIFHSBQIJDTMJCSBSZ4LJB XSJUUFOCZ$

  2.   "CPVUNF 8IBUJT4LJB )PXUPHFUTUBSUFE4LJB 

  3. "CPVU NF QJOF QJOF IUUQTFNPKJHFOOJOKB &NPKJ(FOFSBUPSBVUIPS BCPVU ."6 XSJUUFOCZ1ZUIPO$

  4. B 8IBUJT4LJB

  5. 8IBU JT4LJB § %HSBQIJDTMJCSBSZ § 8SJUUFOCZ$  § $VSSFOUMZEFWFMPQFENBJOMZCZ(PPHMF VOEFSUIF#4%-JDFOTF

    § $SPTTQMBUGPSN § 8PSLTPO8JOEPXT NBD04 -JOVY J04 BOE"OESPJE § 6TFECZMBSHFTDBMFQSPKFDUT § (PPHMF$ISPNF 'JSFGPY "OESPJE FUD
  6. 4JNJMBS QSPKFDUT § DBJSP § 8SJUUFOCZ$ § 6TFECZ'JSFGPY DVSSFOUMZ4LJB JTEFGBVMU

    (5, FUD § *NBHF.BHJDL § 8SJUUFOCZ$ § #VUUIFSFBSFNBOZMBOHVBHFCJOEJOHT § 4PNFUJNFBHP JUIBTPGUFOCFFOVTFEPOXFCTFSWJDF *.)0
  7. "EWBOUBHFT PG4LJB § &BTZUPVTFJOUFSGBDF § 8SJUUFOPOUIFQSFNJTFPGVTJOH$ § 6TJOHTNBSUQPJOUFSTXJUISFUVSOUZQFT § 4JNJMBSUP"OESPJEHSBQIJDT"1*

    § 'VMGJMMFEIBSEXBSFSFOEFSJOHTVQQPSU § 0QFO(- 0QFO(-&4 § 7VMLBO .FUBM § %JSFDU% UISPVHI"/(-&
  8. %JTBEWBOUBHFT PG4LJB § )VHF § MJCTLJBB JTPWFS.#GPSSFMFBTFCVJMEGPSNBD04 § )BSEUPHFUTUBSUFE §

    "MNPTUOPPGGJDJBMEPDVNFOUBUJPO § #VUTPVSDFDPEFJTTPFBTZUPSFBE § 'FXBSUJDMFTUIBUUSJFEVTJOH4LJB § 6OGBNJMJBSUPPMDIBJOHO (FOFSBUF/JOKB OJOKB
  9. B )PXUPHFUTUBSUFE4LJB

  10. )PXUP HFU TUBSUFE § 3FGFSFODFT § 0GGJDJBMXFCTJUFhttps://skia.org/ § Source code

    : https://github.com/google/skia § 4FFQSPKFDUTUIBUEFQFOEFEPO4LJB 4LJB4IBSQ "OESPJE FUD § *`WFDSFBUFEBTBNQMFQSPKFDU § https://github.com/pine/cpp-mix-5 $ git submodule update --init $ cmake . $ make
  11. %SBXSFDUBOHMF SkPaint paint; paint.setStyle(SkPaint::kFill_Style); paint.setAntiAlias(true); paint.setColor(SK_ColorRED); SkRect rect = SkRect::MakeXYWH(40,

    40, 200, 120); canvas->drawRect(rect, paint);
  12. 0VUQVU FODPEFE JNBHF sk_sp<SkImage> image(surface->makeImageSnapshot()); sk_sp<SkData> data( image->encodeToData(SkEncodedImageFormat::kPNG, 100)); SkFILEWStream

    fh(“example.png”); fh.write(data->data(), data->size()); § 4VQQPSUFEGPSNBUTBSF1/( +1&( (*' 8FC1 FUD
  13. $PODMVTJPO B § 4LJB JT%HSBQIJDTMJCSBSZXSJUUFOCZ$  § 4LJB IBTFBTZUPVTFJOUFSGBDFTJNJMBSUP"OESPJEHSBQIJDT"1* §

    4LJB JTIVHFBOEIBSEUPHFUTUBSUFE CVUGVO 5IBOLZPV