Skip to content

Commit

Permalink
JBR-5213 JBR API v0.0.9 - add GraphicsUtils (#208)
Browse files Browse the repository at this point in the history
* relax type constraints in BltBufferStrategy.getDrawGraphics

(cherry picked from commit 715b615)
  • Loading branch information
AMPivovarov authored and jbrbot committed Dec 20, 2024
1 parent fc529ec commit 62ea2ac
Show file tree
Hide file tree
Showing 7 changed files with 576 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2023 JetBrains s.r.o.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/

package com.jetbrains.desktop;

import sun.awt.ConstrainableGraphics;

import java.awt.geom.Rectangle2D;

public interface ConstrainableGraphics2D extends ConstrainableGraphics {
public void constrain(Rectangle2D region);
public Object getDestination();
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ public class JBRApiModule {
.withStatic("overrideGraphicsEnvironment", "overrideLocalGraphicsEnvironment", "java.awt.GraphicsEnvironment")
.withStatic("setLocalGraphicsEnvironmentProvider", "setLocalGraphicsEnvironmentProvider", "java.awt.GraphicsEnvironment")
.service("com.jetbrains.AccessibleAnnouncer")
.withStatic("announce", "announce", "sun.swing.AccessibleAnnouncer");
.withStatic("announce", "announce", "sun.swing.AccessibleAnnouncer")
.service("com.jetbrains.GraphicsUtils")
.withStatic("createConstrainableGraphics", "create", "com.jetbrains.desktop.JBRGraphicsDelegate")
.clientProxy("com.jetbrains.desktop.ConstrainableGraphics2D", "com.jetbrains.GraphicsUtils$ConstrainableGraphics2D");
}
}
Loading

0 comments on commit 62ea2ac

Please sign in to comment.