Transforme trechos de C em imagens que valem a pena compartilhar, sem sair do seu Mac.
C snippets are usually posted to make a precise point about memory or pointers, so every character matters.
O Codeshot detecta C pelo código que você cola, então não há seletor de linguagem para errar. Aqui está o mesmo trecho em três dos 30 temas inclusos, renderizados com as folhas de estilo do próprio app.
#include<stdlib.h>typedefstruct {char *code;
int scale;
} Snapshot;
intsnapshot_export(const Snapshot *s, constchar *path) {
if (s == NULL || path == NULL) return-1;
return render_and_save(s->code, path, s->scale);
}
GitHub · escuro
#include<stdlib.h>typedefstruct {char *code;
int scale;
} Snapshot;
intsnapshot_export(const Snapshot *s, constchar *path) {
if (s == NULL || path == NULL) return-1;
return render_and_save(s->code, path, s->scale);
}
Solarized · escuro
#include<stdlib.h>typedefstruct {char *code;
int scale;
} Snapshot;
intsnapshot_export(const Snapshot *s, constchar *path) {
if (s == NULL || path == NULL) return-1;
return render_and_save(s->code, path, s->scale);
}
Tokyo Night · escuro
Escolhendo um tema para C
Pointer punctuation is easy to lose at small sizes. Push the font up and trim the snippet rather than fitting more in.
Acertando o tamanho
Deixe a imagem seguir o conteúdo ou fixe uma proporção — 1:1, 4:3, 3:2, 16:9, 9:16, 2:3 ou 3:4 — e exporte em 1×, 2× ou 3× para que continue nítida em telas retina. Copie direto para a área de transferência com ⌘⇧C ou salve com ⌘S.