Delphi

Delphiコードスクリーンショット生成

Delphiのスニペットを、Macから離れることなく共有したくなる画像に。

Object Pascal には begin と end という特徴的な構造があり、画像では明快に読める一方、貼り付け時に再インデントするエディタでは崩れます。

Codeshotは貼り付けたコードからDelphiを判別するので、言語の選び間違いは起きません。付属する30種類のうち3つのテーマで同じスニペットを、アプリ自身のスタイルシートで表示しています。

type
  TSnapshot = class
  private
    FCode: string;
    FScale: Integer;
  public
    constructor Create(const ACode: string; AScale: Integer = 2);
    function ExportTo(const APath: string): Boolean;
  end;
GitHub · ダーク
type
  TSnapshot = class
  private
    FCode: string;
    FScale: Integer;
  public
    constructor Create(const ACode: string; AScale: Integer = 2);
    function ExportTo(const APath: string): Boolean;
  end;
Solarized · ダーク
type
  TSnapshot = class
  private
    FCode: string;
    FScale: Integer;
  public
    constructor Create(const ACode: string; AScale: Integer = 2);
    function ExportTo(const APath: string): Boolean;
  end;
Xcode · ダーク

Delphiに合うテーマ選び

対応する begin と end の組を枠内に収めてください。片方を切ると、釣り合いが取れず間違って見えるコードが残ります。

サイズを正しく決める

画像サイズを内容に合わせるか、比率で固定します(1:1、4:3、3:2、16:9、9:16、2:3、3:4)。そのうえで1×・2×・3×から選んで書き出せば、Retinaディスプレイでも鮮明なままです。Cでクリップボードに直接コピー、またはSで保存できます。

30種類のテーマを見比べるか、全体の流れをご覧ください。

Delphiと、ほかの59言語のために

すべてMac上で動作します。コードが外に出ることはありません。

ダウンロード