frame

moving buffered image to specific coordinates

允我心安 提交于 2019-12-24 14:34:12
问题 I am trying to move the blue square around the grid by pressing the arrow keys. I already set up the KeyListener but when I repaint the frame, I have to move the frame around in order for it to update. How do I make it a smooth animation (moving the square from one coordinate to another)? Example: if (keyCode == KeyEvent.VK_LEFT){ x5=x5-xChange; frame.repaint(); } My images are buffered images and are all set to specific coordinates. Here is my graphics class: public static class

How to stretch inline frame size in panel stretch layout in ADF?

柔情痞子 提交于 2019-12-24 11:07:01
问题 I have .jsff page that contain command button and inline frame. What I want to do is, I want to make command button remain static at the same place and only inline frame can move when scroll the page. Currently what I do is I set some panel stretch layout(StyleClass:AFStetchWidth) . I put the command button at the top. Inline frame in scroll panel group at the center. Here is my structure: af:panelStetchLayout(StyleClass:AFStretchWidth) > Panel Stretch Layout facets bottom center af

How to control a frame from another frame?

自古美人都是妖i 提交于 2019-12-24 10:58:13
问题 I'm writing a small app which has 2 separate frames. The first frame is like a video player controller. It has Play/Stop/Pause buttons etc. It's named controller.py. The second frame contains OpenGL rendering and many things inside it, but everything is wrapped inside a Frame() class as the above. It's named model.py. I'm up to the final part where I have to "join" these two together. Does anyone know how to control a frame (model.py) from another frame (controller.py)? I would like to do

(WPF) How to extract frames from multiframe images (tif, gif)

只谈情不闲聊 提交于 2019-12-24 07:59:49
问题 I'm trying to extract thumnail images of each frame in an animated gif. The following code is how I'm tyring to do it, but the thumbnail property of the BitmapFrame instance is always null. Am I doing something wrong? GifBitmapDecoder bd1 = new GifBitmapDecoder( new Uri(thisImage.Path), BitmapCreateOptions.None, BitmapCacheOption.Default); if (bd1.CheckAccess()) { if (bd1.Frames.Count > 1) { foreach (var frame in bd1.Frames) { BitmapSource frameThmb = frame.Thumbnail; if (frameThmb != null)

Find the origin of subview with respect to UIImage size

删除回忆录丶 提交于 2019-12-24 06:33:04
问题 This is the hierarchy: -- ViewController.View P [width: 375, height: 667] ---- UIImageView A [width: 375, height: 667] [A is holding an image of size(1287,1662)] ---- UIImageView B [width: 100, height: 100] [B is holding an image of size(2400,982)] Note: B is not a subview of A. In the app, B is draggable. And I am trying to merge two A and B where positions are, A [background] and B [foreground]. I want to find the exact position of B such that, after merging it will be at the same position

Find the origin of subview with respect to UIImage size

半腔热情 提交于 2019-12-24 06:32:01
问题 This is the hierarchy: -- ViewController.View P [width: 375, height: 667] ---- UIImageView A [width: 375, height: 667] [A is holding an image of size(1287,1662)] ---- UIImageView B [width: 100, height: 100] [B is holding an image of size(2400,982)] Note: B is not a subview of A. In the app, B is draggable. And I am trying to merge two A and B where positions are, A [background] and B [foreground]. I want to find the exact position of B such that, after merging it will be at the same position

Is there a gcc macro for determining that frame pointers are not eliminated?

与世无争的帅哥 提交于 2019-12-24 04:55:09
问题 When -fomit-frame-pointer is used (automatic for various -O settings), performing a backtrace is problematic. I am wondering if there is a way of determining at compile time that the code is compiled with this switch? In that case, I could put in an #ifndef to guard against backtracing when ill-advised. Is any macro set when this -fomit-frame-pointer switch is on? Thanks, SetJmp 回答1: I just tried this: gcc -E -fomit-frame-pointer -Wp,-dM foo.c > fpo.out gcc -E -Wp,-dM foo.c > no-fpo.out diff

Invalid and inefficient vfw-avi packed B frames detected

你说的曾经没有我的故事 提交于 2019-12-24 03:58:26
问题 I got message Invalid and inefficient vfw-avi packed B frames detected while video was converted. After converting the video, I checked pixel values in video. Values are different from original video. Why values change after converting? and I use lossless intra-frame video codec 'ffv1' command : ffmpeg -i input_video -vcodec ffv1 -acodec pcm_s16le output_video ffmpeg version 1.1.1 Copyright (c) 2000-2013 the FFmpeg developers built on Jan 20 2013 23:05:28 with gcc 4.7.2 (GCC) configuration: -

Using Frame Buffer Objects (FBO) in Borland C++ Builder 6

旧时模样 提交于 2019-12-24 03:03:27
问题 I have an "access violation" on the Frame Buffer Object (FBO)'s command glGenFramebuffersEXT : void TGLForm::DrawScene() { wglMakeCurrent(ghDC, ghRC); glEnable(GL_TEXTURE_2D); GLuint framebuffer, texturefbo; GLenum status; glGenFramebuffersEXT(1, &framebuffer); // access violation here Founding a help thread concerning the FBOs, I checked that the glext.h initialization were okay and repeated amidst the preprocessor lines this way : #include "glext.h" #include "wglext.h" extern

Initial frame to use for UITableViewCell's backgroundView

五迷三道 提交于 2019-12-24 02:18:52
问题 I'm currently initializing my UITableViewCell's backgroundView's frame with self.frame . This seems to work fine for device orientation changes (cell background fills entire cell, looks fine etc). What's a better frame to use (if any)? Edit #1 : I've also initialized the backgroundView with CGRectZero as the frame. This seems to make no difference (UITableViewCells and backgroundViews function just fine in all interface orientations). I've also tested setting the autoresizingMask property of