Skip to content

C API: Credit

sona_draw and sona_snapshot draw a small "Powered by 360sona" badge, its opacity set to 75%, unless SONA_DRAW_NO_CREDIT; an app that turns it off credits 360sona itself, in its credits, about page, footer or store page.

sona_credit is {text ("Powered by 360sona"), url ("https://360sona.com"), rgba (the badge in the SDK's pixel font at the given scale, at full strength: engines show it at 75%, assona_drawdoes), width, height}.

sona_credit_get

sona_result sona_credit_get(sona_ctx *ctx, uint32_t scale,
                            sona_credit *out);
Parameter and type Meaning
ctx
sona_ctx *
The context (required)
scale
uint32_t
The badge's scale: 1, 2 or 3
out
sona_credit *
Receives the sona_credit (required)

Returns SONA_OK. Errors SONA_E_ARGUMENT (what each means).

Example (also in The credit):

sona_credit credit;
if (sona_credit_get(ctx, 2, &credit) == SONA_OK) {
  /* credit.rgba is credit.width x credit.height RGBA pixels: show them
     at 75%, linked to credit.url */
}

The credit text, link and badge. scale is 1 for the badge; max(1, round(min(w, h) / 400)) for snapshots, as the web. Engine plugins draw this badge in a corner.

This page as Markdown · All the docs as one file (llms-full.txt)