Convierte fragmentos de C en imágenes que merece la pena compartir, sin salir de tu Mac.
C snippets are usually posted to make a precise point about memory or pointers, so every character matters.
Codeshot detecta C a partir del código que pegas, así que no hay selector de lenguaje que puedas equivocar. Aquí tienes el mismo fragmento en tres de los 30 temas incluidos, renderizados con las hojas de estilo de la propia 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 · oscuro
#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 · oscuro
#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 · oscuro
Elegir un 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.
Acertar con el tamaño
Deja que la imagen siga a tu contenido o fíjala a una proporción — 1:1, 4:3, 3:2, 16:9, 9:16, 2:3 o 3:4 — y exporta a 1×, 2× o 3× para que se mantenga nítida en pantallas retina. Cópiala al portapapeles con ⌘⇧C o guárdala con ⌘S.