Julia snippets usually accompany a result or a plot, so the code image is half of a pair and should be sized to match its partner.
Codeshotは貼り付けたコードからJuliaを判別するので、言語の選び間違いは起きません。付属する30種類のうち3つのテーマで同じスニペットを、アプリ自身のスタイルシートで表示しています。
Julia
Juliaのスニペットを、Macから離れることなく共有したくなる画像に。
Julia snippets usually accompany a result or a plot, so the code image is half of a pair and should be sized to match its partner.
Codeshotは貼り付けたコードからJuliaを判別するので、言語の選び間違いは起きません。付属する30種類のうち3つのテーマで同じスニペットを、アプリ自身のスタイルシートで表示しています。
struct Snapshot
code::String
theme::String
scale::Int
end
function export(s::Snapshot, path::AbstractString)
img = render(s.code, s.theme)
save(path, img; scale = s.scale)
end
struct Snapshot
code::String
theme::String
scale::Int
end
function export(s::Snapshot, path::AbstractString)
img = render(s.code, s.theme)
save(path, img; scale = s.scale)
end
struct Snapshot
code::String
theme::String
scale::Int
end
function export(s::Snapshot, path::AbstractString)
img = render(s.code, s.theme)
save(path, img; scale = s.scale)
end
Unicode operators and superscripts are common in Julia. Check they render in your chosen font before exporting, since a missing glyph is worse than a plain one.
画像サイズを内容に合わせるか、比率で固定します(1:1、4:3、3:2、16:9、9:16、2:3、3:4)。そのうえで1×・2×・3×から選んで書き出せば、Retinaディスプレイでも鮮明なままです。⌘⇧Cでクリップボードに直接コピー、または⌘Sで保存できます。
30種類のテーマを見比べるか、全体の流れをご覧ください。
すべてMac上で動作します。コードが外に出ることはありません。