1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #import "ui/base/cocoa/appkit_utils.h"
7 #include "ui/base/resource/resource_bundle.h"
11 // Gets an NSImage given an image id.
12 NSImage* GetImage(int image_id) {
13 return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(image_id)
21 void DrawNinePartImage(NSRect frame,
22 const NinePartImageIds& image_ids,
23 NSCompositingOperation operation,
26 NSDrawNinePartImage(frame,
27 GetImage(image_ids.top_left),
28 GetImage(image_ids.top),
29 GetImage(image_ids.top_right),
30 GetImage(image_ids.left),
31 GetImage(image_ids.center),
32 GetImage(image_ids.right),
33 GetImage(image_ids.bottom_left),
34 GetImage(image_ids.bottom),
35 GetImage(image_ids.bottom_right),