graphics

Manually transition swap chain image layouts

Deadly 提交于 2020-12-15 02:00:38
问题 Say I have a render pass with a single color attachment corresponding to the images of a swap chain. Usually, I would set the initialLayout and finalLayout fields of the VkAttachmentDescription to VK_IMAGE_LAYOUT_UNDEFINED and VK_IMAGE_LAYOUT_PRESENT_SRC_KHR , respectively. Now I would like to set the initialLayout to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR instead and perform the transition of a swap chain image to this state manually before the render pass begins. I want to do this using memory

Manually transition swap chain image layouts

六月ゝ 毕业季﹏ 提交于 2020-12-15 01:50:49
问题 Say I have a render pass with a single color attachment corresponding to the images of a swap chain. Usually, I would set the initialLayout and finalLayout fields of the VkAttachmentDescription to VK_IMAGE_LAYOUT_UNDEFINED and VK_IMAGE_LAYOUT_PRESENT_SRC_KHR , respectively. Now I would like to set the initialLayout to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR instead and perform the transition of a swap chain image to this state manually before the render pass begins. I want to do this using memory

Manually transition swap chain image layouts

梦想与她 提交于 2020-12-15 01:50:22
问题 Say I have a render pass with a single color attachment corresponding to the images of a swap chain. Usually, I would set the initialLayout and finalLayout fields of the VkAttachmentDescription to VK_IMAGE_LAYOUT_UNDEFINED and VK_IMAGE_LAYOUT_PRESENT_SRC_KHR , respectively. Now I would like to set the initialLayout to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR instead and perform the transition of a swap chain image to this state manually before the render pass begins. I want to do this using memory

How can I move the field name to the bottom of graph in Tableau?

匆匆过客 提交于 2020-12-01 11:03:10
问题 I'm using Tableau 9.0.2 to generate graphs and I can't for the life of me figure out how to move (ideally drag, right?) the field name for my x-axis from the top to the bottom of the graph, by the units, where it should be. I'm attaching a picture because it's probably the easiest way to make clear what I'm trying to do, given this is a question of positioning: This Tableau graph has the field name "Iterations" at the top of the graph, not the bottom, where it should be. While this might not

How can I move the field name to the bottom of graph in Tableau?

泪湿孤枕 提交于 2020-12-01 11:03:08
问题 I'm using Tableau 9.0.2 to generate graphs and I can't for the life of me figure out how to move (ideally drag, right?) the field name for my x-axis from the top to the bottom of the graph, by the units, where it should be. I'm attaching a picture because it's probably the easiest way to make clear what I'm trying to do, given this is a question of positioning: This Tableau graph has the field name "Iterations" at the top of the graph, not the bottom, where it should be. While this might not

How to transform a shape in VB.NET

无人久伴 提交于 2020-11-29 10:22:25
问题 I'm trying to first draw a shape (which i've done already) and then have it transformed as selected by a user for example, rotated to a certain angle, or scaled, showing this original shape and the newly transformed shape. I've tried the following on trying to rotate: Private Sub paint_box_Paint(sender As Object, e As PaintEventArgs) Handles paint_box.Paint Dim x As Integer = paint_box.Size.Width / 2 Dim y As Integer = paint_box.Size.Height / 2 Dim rect As New Rectangle(x, y, 80, 80) ' Create

[翻译]PyCairo指南--变换

折月煮酒 提交于 2020-11-18 20:10:43
变换 PyCairo 图形学编程指南的这个部分,我们将讨论变换。 一个仿射变换 由0个或者多个线性变换(旋转,放缩或切变)和平移(移位)组成。一些线性变换可以被结合起来放进一个单一的矩阵中。一个 旋转 是将一个精确的对象沿着一个固定的点做移动的变换。一个 放缩 是将对象进行放大或缩小的变换。放缩系数在所有方向上都是一致的。一个 平移 ,是在一个特定的方向上,将每一个点都移动固定的距离的变换。一个切变是一个将一个对象正交的移动向给定的轴,同时保持轴某一侧的值比另一侧更大的变换。 来源: (wikipedia.org, freedictionary.com) 平移 下面的例子描述了一个简单的平移。 def on_draw(self, wdith, cr): cr.set_source_rgb(0.2, 0.3, 0.8) cr.rectangle(10, 10, 60, 60) cr.fill() cr.translate(30, 30) cr.set_source_rgb(0.8, 0.3, 0.2) cr.rectangle(0, 0, 60, 60) cr.fill() cr.translate(60, 60) cr.set_source_rgb(0.8, 0.8, 0.2) cr.rectangle(0, 0, 60, 60) cr.fill() cr.translate(70