Skip to content

Commit 3f387bd

Browse files
committed
Testing...
1 parent ed5ebc6 commit 3f387bd

File tree

3 files changed

+4
-7
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics
  • tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit

3 files changed

+4
-7
lines changed

bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2686,6 +2686,8 @@ void initCairo() {
26862686
Cairo.cairo_set_fill_rule(cairo, Cairo.CAIRO_FILL_RULE_EVEN_ODD);
26872687
data.state &= ~(BACKGROUND | FOREGROUND | FONT | LINE_WIDTH | LINE_CAP | LINE_JOIN | LINE_STYLE | DRAW_OFFSET);
26882688
setCairoClip(data.damageRgn, data.clipRgn);
2689+
setAntialias(SWT.DEFAULT);
2690+
setTextAntialias(SWT.DEFAULT);
26892691
}
26902692

26912693
void computeStringSize() {

bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,11 +1260,7 @@ void init(int width, int height) {
12601260
this.type = SWT.BITMAP;
12611261

12621262
/* Create the pixmap */
1263-
if (GTK.GTK4) {
1264-
surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_RGB24, width, height);
1265-
} else {
1266-
surface = GDK.gdk_window_create_similar_surface(GDK.gdk_get_default_root_window(), Cairo.CAIRO_CONTENT_COLOR, width, height);
1267-
}
1263+
surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_ARGB32, width, height);
12681264
if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES);
12691265
// When we create a blank image we need to set it to 100 in GTK3 as we draw using 100% scale.
12701266
// Cairo will take care of scaling for us when image needs to be scaled.

tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
*/
2424
@RunWith(Suite.class)
2525
@Suite.SuiteClasses({
26-
AllNonBrowserTests.class,
27-
AllBrowserTests.class
26+
Test_org_eclipse_swt_graphics_Image.class,
2827
})
2928
public class AllTests {
3029

0 commit comments

Comments
 (0)