OSDN Git Service

Doutaku を 1.0 にアップデート
[kcd/KCD.git] / KCD / StrengthenListItemView.swift
1 //
2 //  StrengthenListItemView.swift
3 //  KCD
4 //
5 //  Created by Hori,Masaki on 2017/01/02.
6 //  Copyright © 2017年 Hori,Masaki. All rights reserved.
7 //
8
9 import Cocoa
10
11 final class StrengthenListItemView: NSBox {
12     
13     override func draw(_ dirtyRect: NSRect) {
14         
15         super.draw(dirtyRect)
16         
17         let width = bounds.width
18         let height = bounds.height
19         
20         borderColor.set()
21         NSBezierPath.defaultLineWidth = borderWidth
22         NSBezierPath.stroke(bounds)
23         
24         Polygon()
25             .move(to: NSPoint(x: 29.5, y: 0))
26             .line(to: NSPoint(x: 29.5, y: height))
27             .move(to: NSPoint(x: 67.5, y: 0))
28             .line(to: NSPoint(x: 67.5, y: height))
29             .move(to: NSPoint(x: 227.5, y: 0))
30             .line(to: NSPoint(x: 227.5, y: height))
31             .move(to: NSPoint(x: 0, y: 17.5))
32             .line(to: NSPoint(x: width, y: 17.5))
33             .move(to: NSPoint(x: 0, y: 34.5))
34             .line(to: NSPoint(x: width, y: 34.5))
35             .stroke()
36     }
37 }