C snippets are usually posted to make a precise point about memory or pointers, so every character matters.
Codeshotは貼り付けたコードからCを判別するので、言語の選び間違いは起きません。付属する30種類のうち3つのテーマで同じスニペットを、アプリ自身のスタイルシートで表示しています。
C
Cのスニペットを、Macから離れることなく共有したくなる画像に。
C snippets are usually posted to make a precise point about memory or pointers, so every character matters.
Codeshotは貼り付けたコードからCを判別するので、言語の選び間違いは起きません。付属する30種類のうち3つのテーマで同じスニペットを、アプリ自身のスタイルシートで表示しています。
#include <stdlib.h>
typedef struct {
char *code;
int scale;
} Snapshot;
int snapshot_export(const Snapshot *s, const char *path) {
if (s == NULL || path == NULL) return -1;
return render_and_save(s->code, path, s->scale);
}
#include <stdlib.h>
typedef struct {
char *code;
int scale;
} Snapshot;
int snapshot_export(const Snapshot *s, const char *path) {
if (s == NULL || path == NULL) return -1;
return render_and_save(s->code, path, s->scale);
}
#include <stdlib.h>
typedef struct {
char *code;
int scale;
} Snapshot;
int snapshot_export(const Snapshot *s, const char *path) {
if (s == NULL || path == NULL) return -1;
return render_and_save(s->code, path, s->scale);
}
Pointer punctuation is easy to lose at small sizes. Push the font up and trim the snippet rather than fitting more in.
画像サイズを内容に合わせるか、比率で固定します(1:1、4:3、3:2、16:9、9:16、2:3、3:4)。そのうえで1×・2×・3×から選んで書き出せば、Retinaディスプレイでも鮮明なままです。⌘⇧Cでクリップボードに直接コピー、または⌘Sで保存できます。
30種類のテーマを見比べるか、全体の流れをご覧ください。
すべてMac上で動作します。コードが外に出ることはありません。