Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

14
LINES

< > BotCompany Repo | #1019213 // imageSurface_pixelated - sets multiple options

JavaX fragment (include)

svoid imageSurface_pixelated(ImageSurface imageSurface) {
  if (imageSurface == null) ret;
  imageSurface.setDoubleBuffered(true); // solve flickering when partially obscured
  imageSurface.noAlpha = true;
  imageSurface.interpolationMode = RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR;
  repaint(imageSurface);
}

svoid imageSurface_pixelated(ImageSurface imageSurface, bool pixelated) {
  if (pixelated)
    imageSurface_pixelated(imageSurface);
  else
    imageSurface_unpixelated(imageSurface);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019213
Snippet name: imageSurface_pixelated - sets multiple options
Eternal ID of this version: #1019213/5
Text MD5: d342e50a2650c7be3ffa0810e5ad7426
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-12-26 18:51:31
Source code size: 520 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 354 / 381
Version history: 4 change(s)
Referenced in: [show references]